Project

General

Profile

Actions

Bug #97661

open

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

Added by Dennis Metz over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2022-05-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

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,
                ],
            ]
        ],
    ];
Actions

Also available in: Atom PDF