Wrong xdata sorting

Enonic version: 7.12.2
OS: Linux

Hi,

After the report I made about missing events, we were suggested to upgrade the servers to the latest XP version. However, after upgrading the first (Test) environment, the customer complained the xdata pieces were reordered, in a way they didn’t like. Since there’s a lot going on on that server, we decided to wait until the next server was upgraded.
Today, the Staging’s environment was upgraded to 7.12.2. The customer already pointed the xdata there is now in a different order than before (7.10.3) and asked to fix it. As far as I know, we can’t sort the xdata, can we somehow?

Image from the customer:

The main app’s xdatas in site.xml:

PS: forvaltning is displayed as Ansvarlig in CS

1 Like

Hi,
It is not possible to change order of the xDatas on client side.
We created the issue for that Wrong xdata sorting · Issue #6450 · enonic/app-contentstudio · GitHub.

1 Like

Sorting is apparently alphabetical now. Manual sorting is not as “simple” as it may seem, as the X-data may come from many different apps. As such. there are multiple potential approaches to sorting them:

  • Alphabetical across all apps
  • Manually sorted using site.xml + group by app (sort apps based on order i site setup)
  • Priority, each x-data can be given a priority, and they will be sorted acorrding to this across all apps

So, @maaubt - which do you think is the most reasonable?

I believe the last one is promising. It gives the devs some control over the sorting, in case the customer wants it, and still leaves room for one of the others as a default behavior. A default priority (preferably not high) in case it’s not defined might also prevent issues with projects that don’t have it set.
Is it doable?

We used (and liked) the sorting from no. 2 Thomas descirbes. Devs only had to sort apps on a site, and organize the lines in site.xml to get the desired order. We had no problems with that approach, it gave us expected behaviour every time.

@tsi
Is there any chance a solution can be included in a soonish release? (if not already)

We haven’t started looking at this issue yet, unfortunately.