Bug #93760
openuidInList does not respect the order of the comma-separated values
0%
Description
Using uidInList
(either TS select
or DatabaseQueryProcessor
) does not respect the order of the uids.
One has to use an ugly workaround, like this:
selectFields = *, FIND_IN_SET(uid, ###uidList###) AS uid_sort
(the marker being simply filled with the CSV field).
Of course this comes from the underlaying storage engine (MySQL in my case), but the core should implicitly order by the list automatically by adding a proper SQL statement ( FIND_IN_SET
or ORDER BY FIELD()
) or post-processing the result before passing it back to the user.
This is a bug, because TYPO3 allows to have sortable TCA select fields (multipleSideBySide
, for example) that can be stored as CSV. So the core should respect the order when selecting on such a field.
Updated by Benni Mack about 1 year ago
Have the same issue. Thanks for the report
This is my TS.
# keep order select.markers.orderings.data = field:field_of_parent_table select.selectFields = *, FIND_IN_SET(uid, ###orderings###) AS uid_sort select.orderBy = uid_sort
I wonder how we could fix this to make this possible by default or with a flag and make it cross DBMS conform