Issue Bug Closed

#106473Error using duplicate button in column edit mode

Rémy DANIEL 04/01/25, 12:57 updated 12/02/25, 14:21

Description

In column edit mode, the duplicate button is shown.

1/ Enter edit mode by clicking on the edit button in the head of the content column:

clipboard-202504011452-xxgqd.png

2/ Click the “duplicate” button in the header bar

clipboard-202504031309-mygnn.png

Cliquing on it can lead to an error, because the duplicate functionality is not meant to handle multiple contents.
See the source code and the debug session: $nUid normaly is an integer or “NEW…”, here we can see the list of contents that are being duplicated.

clipboard-202504011447-udex4.png

And see the cmdMap passed to DataHandler:

clipboard-202504011456-abedf.png

The error can then rise on extension that hook on the DataHandler.
This is the case with b13/container, which breaks:

Argument 1 passed to B13\Container\Domain\Factory\ContainerFactory::buildContainer() must be of the type int, string given, called in /var/www/html/web/typo3conf/ext/container/Classes/ContentDefender/ContainerColumnConfigurationService.php on line 67

IMHO, the duplicate button should not be shown at all in column edit mode, because it does not make sense to duplicate all the column’s content inplace.

Reviews 2

Files 4

History 711

  1. Georg Ringer commented and changed status New Needs Feedback <span data-processor="relativetime" data-value="2025-04-03T06:23:37+00:00" > 04/03/25, 06:23 </span>

    hi,

    thanks for the detailed report – however I can’t reproduce that – where can the duplicate button be found?

  2. Rémy DANIEL changed attached clipboard-202504031309-mygnn.png description <span data-processor="relativetime" data-value="2025-04-03T11:11:11+00:00" > 04/03/25, 11:11 </span>

  3. Rémy DANIEL commented <span data-processor="relativetime" data-value="2025-04-03T11:11:36+00:00" > 04/03/25, 11:11 </span>

    Hi

    I added one more screenshot, I hope it is more clear.

  4. Riccardo De Contardi commented and changed status Needs Feedback New <span data-processor="relativetime" data-value="2025-04-06T14:31:27+00:00" > 04/06/25, 14:31 </span>

    I think this is still valid on version 14.0.0-dev (latest main) with the following setup:

    1. Add to your admin the following user TSConfig:

    options.showDuplicate = 1
    options.showDuplicate.tt_content = 1

    2. On a page, create 2 content elements
    3. Click on the “edit column” button (as seen on the screenshot clipboard-202504031309-mygnn.png )
    4. Click on “duplicate” button

    Result

    I got an exception:

    (1/1) #1476107295 TYPO3\CMS\Core\Error\Exception
    PHP Warning: Undefined array key "911,917" in /var/www/html/typo3/sysext/backend/Classes/Controller/EditDocumentController.php line 756

    (numbers 911,917 are the ids of the content elements)

  5. Sébastien Delcroix commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-04-10T19:55:08+00:00" > 04/10/25, 19:55 </span>

    Applied in changeset commit:d5f38ac4f1009407eeeda4c63e6421b93e564b57.