Bug #101796
closedSuggestWizardController doesn't respect TCA overrides on new Content elements
100%
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.
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).
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
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
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
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
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
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
Updated by Stefan Bürk over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 31156831bafe00f78cbeaaa93dc5985cdb7be573.
Updated by Francois Suter about 1 year ago
- Related to Bug #102256: Suggest wizard does not work for new elements added
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