Issue Bug Closed

#83898Having the sorting field in the TCA of tt_content partly breaks the copy function in the page module

S P 02/14/18, 16:39 updated 11/14/26, 20:22

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.

History 8

  1. S P changed subject Having the sorting field in the TCA of tt_content partly breakes the copy function in the page module Having 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>

  2. S P commented and changed description TYPO3 Version 8 12 <span data-processor="relativetime" data-value="2024-12-16T10:56:21+00:00" > 12/16/24, 10:56 </span>

    Still valid in v12

  3. S P commented and changed TYPO3 Version 12 13 <span data-processor="relativetime" data-value="2024-12-19T08:45:24+00:00" > 12/19/24, 08:45 </span>

    Bug still present on v13.

  4. S P commented and changed description TYPO3 Version 13 14 <span data-processor="relativetime" data-value="2026-06-11T07:16:22+00:00" > 06/11/26, 07:16 </span>

    Bug still present in v14.

  5. Georg Ringer commented and changed status New Closed <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 sortby field that is also configured in TCA columns (for example tt_content.sorting as passthrough for 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 the sortby field of the source record out, so the sorting is always calculated from the destination. The fix is not limited to pages and applies to tt_content as 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.