Project

General

Profile

Actions

Bug #101796

closed

SuggestWizardController doesn't respect TCA overrides on new Content elements

Added by Markus Hofmann over 1 year ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Backend API
Target version:
-
Start date:
2023-08-30
Due date:
% Done:

100%

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

Description

When restricting allowed tables on group field via columnsOverrides, creating a
new content element and adding a record via SuggestWizard, the wizard doesn't
respect the columnsOverrides restriction.

After first save and testing again, the restrictions are respected.

Example configuration for tt_content field records

$GLOBALS['TCA']['tt_content']['types']['contact']['columnsOverrides']['records'] = [
    'config' => [
        'allowed' => 'tt_address',
    ],
];

Current behaviour:

When creating a new content element with no ID given, the SuggestWizardController
is not able to detect the correct override setting, as the controller fetches the
information of possible overrides from the at this moment not saved record from database.

Expected behaviour:

Using the suggest in group field only returns records, which are allowed.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #102256: Suggest wizard does not work for new elementsClosed2023-10-25

Actions
Actions #1

Updated by Stefan Bürk over 1 year ago

  • Status changed from New to Accepted
  • Assignee set to Stefan Bürk

Confirmation

Could reproduce this in monorepo for:

  • main
  • 12.4
  • 11.5

Reproduction steps

This can be easy reproduced.

  • Add the TCA override below to a sitepackage/extension in `typo3conf/ext/some_ext`
  • Ensure the extension is enabled
  • Ensure that styleguide is enabled and the backend TCA page tree generated
  • Navigate to `styleguide TCA demo` -> `staticdata` in the `Page` module
  • Add a new shortcut content element (`Special elements` -> `Insert records`) - DO NOT SAVE THE RECORD if form is opened !
  • Enter `foo` in the record suggestion search field

Note: If the record is opened as edit or saved one time, the suggested records are correct. The issue only occures for new
records before the first save event.

$GLOBALS['TCA']['tt_content']['types']['shortcut']['columnsOverrides']['records'] = [
    'config' => [
        'allowed' => 'tx_styleguide_staticdata',
    ],
];

Expected

Only the styleguide staticdata records are displayed instead of pages or other content elements.

Current

No record or page records are display (depending on search string).

Actions #2

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Accepted to Under Review

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

Actions #3

Updated by Gerrit Code Review over 1 year ago

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

Actions #4

Updated by Gerrit Code Review over 1 year ago

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

Actions #5

Updated by Gerrit Code Review over 1 year ago

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

Actions #6

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 12.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/+/80773

Actions #7

Updated by Gerrit Code Review over 1 year ago

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

Actions #8

Updated by Stefan Bürk over 1 year ago

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

Updated by Francois Suter about 1 year ago

  • Related to Bug #102256: Suggest wizard does not work for new elements added
Actions #10

Updated by Francois Suter about 1 year ago

This fix had a kind of "side correction" with the uid sent in the payload. That little extra has actually caused a regression. Please see https://forge.typo3.org/issues/102256

Actions #11

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF