#83898Having the sorting field in the TCA of tt_content partly breaks the copy function in the page module
Description
Adding tt_content.sorting to the TCA of tt_content (e.g. to enable the field for Extbase models) partly breaks the copy functionality in the page module. The sorting of the target position will not be calculated correctly, but the sorting of the original row will be used instead.
The only solution is to set the TCA type of the field to none (this works for mapping it to Extbase models, but other people may have other intentions to add the sorting field to the TCA where this type might not be valid, especially if one wants to add it to the showitems). Not even the type passthrough works.
Discovered and tested this in version 8, still valid as of v14.
Steps to reproduce:
Add this tt_content TCA:
$GLOBALS['TCA']['tt_content']['columns']['sorting'] = [
'config' => [
'type' => 'passthrough'
]
];
Then create three CE (headlines for example), title them “ONE”, “TWO”, “THREE”, order them acordingly.
Then, in the page module, copy element “ONE”. Then click the insert button after “THREE”.
The copy will land between “ONE” and “TWO” (sorting was not adjusted while copying).
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 8
-
S P changed subject
Having the sorting field in the TCA of tt_content partly breakes the copy function in the page moduleHaving the sorting field in the TCA of tt_content partly breaks the copy function in the page module <span data-processor="relativetime" data-value="2018-02-15T08:57:35+00:00" > 02/15/18, 08:57 </span> -
Riccardo De Contardi changed category <span data-processor="relativetime" data-value="2018-09-18T16:38:14+00:00" > 09/18/18, 16:38 </span>
-
S P commented and changed description TYPO3 Version
812 <span data-processor="relativetime" data-value="2024-12-16T10:56:21+00:00" > 12/16/24, 10:56 </span> -
S P commented and changed TYPO3 Version
1213 <span data-processor="relativetime" data-value="2024-12-19T08:45:24+00:00" > 12/19/24, 08:45 </span>Bug still present on v13.
-
S P commented and changed description TYPO3 Version
1314 <span data-processor="relativetime" data-value="2026-06-11T07:16:22+00:00" > 06/11/26, 07:16 </span>Bug still present in v14.
-
Georg Ringer changed Related to #106678 <span data-processor="relativetime" data-value="2026-11-14T20:20:54+00:00" > 11/14/26, 20:20 </span>
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-14T20:22:01+00:00" > 11/14/26, 20:22 </span>Hi,
thanks for the report and for keeping it up to date over the years.
This is the same problem as #106678, which has been resolved in the meantime: when a table has a
sortbyfield that is also configured in TCAcolumns(for examplett_content.sortingaspassthroughfor Extbase), the sorting of the source record replaced the sorting calculated for the destination, so the copy ended up next to its source record.DataHandler::copyRecord()now leaves thesortbyfield of the source record out, so the sorting is always calculated from the destination. The fix is not limited to pages and applies tott_contentas well.Closing this one as a duplicate of #106678. If the copy still lands at the wrong position with a version that contains that change, please create a new issue and provide information to reproduce it.
Still valid in v12