Issue Bug Closed

#82032Copying page containing tt_content irre elements causes error

Tobi Kretschmann 08/03/17, 15:34 updated 05/07/19, 12:17

Description

If the content element has an inline relation to tt_content (PID is the same) and the parent page is copied and pasted, the following error message will be displayed.

‘1: Repeated attempt to copy record “tt_content:17671” with override values’ (see screenshot)

The TCA for tt_content used to reproduce it, is:

$additionalFields = [
    'parent_id'                 => [
        'config' => [
            'type' => 'passthrough',
        ]
    ],
    'item' => [
        'exclude'    => 0,
        'label'      => 'Element',
        'config'     => [
            'type'             => 'inline',
            'foreign_table'    => 'tt_content',
            'foreign_field'    => 'parent_id',
        ],
    ],
];
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('tt_content', $additionalFields);

$GLOBALS['TCA']['tt_content']['types']['content_element']['showitem'] .= '
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.general;general,
item
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
';    

Reviews 3