Bug #82489

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

Added by Georg Tiefenbrunn about 4 years ago. Updated about 1 year 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

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
#1

Updated by Christian Eßl about 2 years ago

  • Related to Bug #71918: ['appearance']['enabledControls']['new'] = false does not hide "New" button in Inline Elements added
#2

Updated by Christian Eßl about 2 years ago

Was introduced in #71918.

#3

Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65701

#4

Updated by Gerrit Code Review about 1 year ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65701

#5

Updated by Oliver Bartsch about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#6

Updated by Gerrit Code Review about 1 year ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65805

#7

Updated by Oliver Bartsch about 1 year ago

  • Status changed from Under Review to Resolved
#8

Updated by Oliver Bartsch about 1 year ago

  • Related to Bug #92397: Regression: New property showNewRecordLink is superfluous added
#9

Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed
#10

Updated by Oliver Bartsch 9 months ago

  • Related to Bug #93595: TCA inline element: appearance config partially not working added
#11

Updated by Oliver Bartsch 4 months ago

  • Related to Task #94764: Revert changes regarding newRecordLink added
#12

Updated by Oliver Bartsch 4 months ago

  • Related to Feature #94765: Introduce new option "showNewRecordLink" added

Also available in: Atom PDF