Project

General

Profile

Actions

Bug #93760

open

uidInList does not respect the order of the comma-separated values

Added by Stefan P over 3 years ago. Updated 10 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Content Rendering
Target version:
-
Start date:
2021-03-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.

Actions #1

Updated by Stefan P over 2 years ago

  • TYPO3 Version changed from 9 to 10
Actions #2

Updated by Benni Mack 10 months 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

Actions

Also available in: Atom PDF