Issue Bug Closed

#97661Create new not working as expected when using "foreign_selector" and "useCombination"

Dennis Metz 05/19/22, 11:56 updated 11/16/26, 10:10

Description

If the two options foreign_selector and useCombination are set, I get two buttons in my element in the backend – one “Create new” and one “Create new relation”, whereby the second button is at the end of a select field.

If I click on “Create new relation” everything fits. A new relation is then created between the elements.
However, if I click on “Create new”, a new data set is not created as expected but the data set that was presumably created last is used – i.e. a new relation is created.

The problem also already exists in 10.4.28 or earlier.

    $GLOBALS['TCA']['tt_content']['columns']['xxxxxx'] = [
        'exclude' => false,
        'label' => 'xxxxxx',
        'config' => [
            'type' => 'inline',
            'foreign_table' => 'xxxxxx',
            'foreign_field' => 'content_uid',
            'foreign_label' => 'video_uid',
            'foreign_sortby' => 'sorting',
            'foreign_selector' => 'video_uid',
            'foreign_unique' => 'video_uid',
            'maxitems' => '100',
            'appearance' => [
                'useCombination' => true,
                'collapseAll' => false,
                'expandSingle' => true,
                'useSortable' => true,
                'enabledControls' => [
                    'info' => true,
                    'new' => true,
                    'dragdrop' => true,
                    'sort' => true,
                    'hide' => true,
                    'delete' => true,
                    'localize' => true,
                ],
            ]
        ],
    ];

Reviews 0

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

History 3

  1. Benni Mack commented and changed status New Closed <span data-processor="relativetime" data-value="2026-11-16T10:10:59+00:00" > 11/16/26, 10:10 </span>

    Closing as duplicate of #97833