Bug #78986
closedDefault TCA configuration breaks sys_file_reference sorting_foreign
100%
Description
The "sorting_foreign" used to sort inline sys_file_reference records, handles the sorting by using integers like 1,2,3,4,5...
The field "sorting_foreign" is configured in the core as:
'sorting_foreign' => [ ... 'config' => [ 'type' => 'input', ... 'range' => [ 'upper' => '1000', 'lower' => '10' ] ... ] ]
Saving operations in the backend can therefore result in all "sorting_foreign" values < 10 being set to 10 (because of the range setting), which breaks the sorting!
This issue wasnt easy to reproduce, for me it appeared by sorting inline images in the live workspace (resulting in "correct" sorting_foreign values), then making changes to other inline images in the draft workspace (resulting in all sorting "foreign_values" being set to 10).
The fix should be easy by just removing the range constraint completely from the sys_file_reference TCA configuration (i appended a diff file).
Files