Issue Feature Under Review Quiet

#104740Exclude tables when copying a page record in the backend

Andreas Kießling 08/26/24, 21:54 updated 09/29/26, 12:38

Description

When a page is copied, all tables that the current user has access to are copied.
For an admin, array_keys($GLOBALS[‘TCA’]) is used to determine the list of tables to copy.
When an extension creates log records, e.g. for form submissions, this may lead to errors or copying a lot of records that should rather be skipped.

You might argue that you can make the storage page configurable, but then the user needs to take care of that as well – or you will probably store the logs of two different forms in the same storage record.

Thus i’d like to propose either a new TCA setting that can then be used to filter the result of \TYPO3\CMS\Core\DataHandling\DataHandler::getAllowedTablesToCopyWhenCopyingAPage so that you can easily skip all those log tables etc. by configuration, or an event that gets the $copyTablesArray handed over.

Reviews 1

History 58

  1. Andreas Kießling commented <span data-processor="relativetime" data-value="2025-02-25T16:37:16+00:00" > 02/25/25, 16:37 </span>

    On another project i also get errors when i want to duplicate a complete site:

    1: Attempt to insert record “sys_redirect:354” on a page (4807) that can’t store record type

    with 4807 as the uid of the newly created root page.

    The sys_directs are automatically created when a slug is changed —> these should not be copied over to avoid conflicts when the redirect sources are evaluated