Project

General

Profile

Actions

Bug #82489

closed

No newRecordLink if config.appearance.enabledControls.new = false

Added by Georg Tiefenbrunn over 6 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend User Interface
Target version:
-
Start date:
2017-09-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Using the following TCA definition only the field label gets rendered in the BE (if no record is assigned). The action button "Create new" is missing.

$addToTcaColumns['my_field'] = [
    'label' => 'label',
    'config' => [
        'type' => 'inline',
        'allowed' => 'my_tabel',
        'appearance' => [
            'enabledControls' => [
                'delete'    => true,
                'dragdrop'  => false,
                'hide'      => true,
                'info'      => true,
                'new'       => false,
                'sort'      => false,
                'localize'  => true,
            ],
            'collapseAll'   => false,
            'expandSingle'  => false,
            'useSortable'   => false,
        ],
        'behaviour' => [
            'allowLanguageSynchronization'          => true,
            'localizeChildrenAtParentLocalization'  => true,
            'enableCascadingDelete'                 => true,
            'disableMovingChildrenWithParent'       => false,
        ],
        'foreign_table' => 'my_tabel',
        'foreign_field' => 'uid_foreign',
        'foreign_sortby' => 'sorting',
        'minitems' => 1,
        'maxitems' => 1,
    ],
];

If config.appearance.enabledControls.new = true the "Create new" action button gets rendered, but the new inline record will have a "Create new record after this record" button (plus icon "+").
That doesn't make sense if you want exactly one relation (minitems=maxitems=1) - that's why I disabled this button.

According to TCA reference https://docs.typo3.org/typo3cms/TCAReference/ColumnsConfig/Type/Inline.html#appearance

enabledControls (array) Associative array ... If the accordant values are set to a boolean value (true or false), the control is shown or hidden in the header of each record.

config.appearance.enabledControls.new = false should only affect the inline records and not the "global" new record action button.


Related issues 5 (0 open5 closed)

Related to TYPO3 Core - Bug #71918: ['appearance']['enabledControls']['new'] = false does not hide "New" button in Inline ElementsClosed2015-11-28

Actions
Related to TYPO3 Core - Bug #92397: Regression: New property showNewRecordLink is superfluousClosedOliver Bartsch2020-09-24

Actions
Related to TYPO3 Core - Bug #93595: TCA inline element: appearance config partially not workingClosed2021-02-26

Actions
Related to TYPO3 Core - Task #94764: Revert changes regarding newRecordLinkClosedOliver Bartsch2021-08-09

Actions
Related to TYPO3 Core - Feature #94765: Introduce new option "showNewRecordLink"ClosedOliver Bartsch2021-08-09

Actions
Actions

Also available in: Atom PDF