Issue Bug Closed

#92285TCA type group with multiple enabled selects 2 elements at once

Nikita Hovratov 09/11/20, 09:32 updated 04/24/25, 14:39

Description

If you open the element browser and select one item it gets placed two times in the list.
Does not happen on current v11 branch.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Files 1

History 2

  1. Daniel Siepmann commented <span data-processor="relativetime" data-value="2021-03-15T14:42:05+00:00" > 03/15/21, 14:42 </span>

    Can confirm the issue.
    Discovered it via https://github.com/FriendsOfTYPO3/legacy-collections which has the following TCA for a column:

            'items' => [
                'label' => 'LLL:EXT:legacy_collections/Resources/Private/Language/locallang_tca.xlf:sys_collection.items',
                'config' => [
                    'type' => 'group',
                    'internal_type' => 'db',
                    'prepend_tname' => true,
                    'allowed' => '*',
                    'MM' => 'sys_collection_entries',
                    'MM_hasUidField' => true,
                    'multiple' => true,
                    'size' => 5
                ]
            ],

    Not sure what multiple should do, it is not mentioned for fields of type group at docs.typo3.org: https://docs.typo3.org/m/typo3/reference-tca/master/en-us/ColumnsConfig/Type/Group/Properties/Index.html

    It either should do nothing, or also be added to docs.

    Unsetting the property works (e.g. merge overwrite), setting to false does also work.

    Looks like https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js#L130 is called twice. If multiple is true, it will execute twice. If it is false, it will not execute a 2nd time, as it checks for duplicates and stops.
    First its called from https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js#L115, and then from https://github.com/TYPO3/TYPO3.CMS/blob/10.4/typo3/sysext/backend/Resources/Public/JavaScript/FormEngine.js#L687.
    Both are triggered from https://github.com/TYPO3/TYPO3.CMS/blob/10.4/Build/Sources/TypeScript/recordlist/Resources/Public/TypeScript/ElementBrowser.ts#L168.

    Hope that helps to find the bug and bugfix.

  2. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2025-04-24T14:39:42+00:00" > 04/24/25, 14:39 </span>

    didn’t happen on v11 and also can’t be confirmed on main – closing issue