#104740Exclude tables when copying a page record in the backend
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
Related issues 2
History 58
-
Andreas Kießling commented <span data-processor="relativetime" data-value="2025-02-25T16:37:16+00:00" > 02/25/25, 16:37 </span>
-
Andreas Kießling changed Related to #96651 <span data-processor="relativetime" data-value="2025-03-11T15:25:00+00:00" > 03/11/25, 15:25 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 75020 status
NewUnder Review <span data-processor="relativetime" data-value="2026-09-28T13:51:34+00:00" > 09/28/26, 13:51 </span> -
Gerrit Code Review pushed patch set 4 for main to change 75020 <span data-processor="relativetime" data-value="2026-09-29T11:15:14+00:00" > 09/29/26, 11:15 </span>
-
Anton Danilov changed Duplicated by #108353 <span data-processor="relativetime" data-value="2026-09-29T11:42:51+00:00" > 09/29/26, 11:42 </span>
-
Anton Danilov changed
Duplicated by #108353<span data-processor="relativetime" data-value="2026-09-29T12:14:24+00:00" > 09/29/26, 12:14 </span> -
Anton Danilov changed Related to #108353 <span data-processor="relativetime" data-value="2026-09-29T12:14:29+00:00" > 09/29/26, 12:14 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 75020 <span data-processor="relativetime" data-value="2026-09-29T12:38:32+00:00" > 09/29/26, 12:38 </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