Bug #98436
closedCan't edit record (stuck) if hideDeleteIcon is set.
100%
Description
JS console error:Uncaught TypeError: Cannot read properties of null (reading 'classList')
Step to reproduce:
- just add 'hideDeleteIcon' => true
to, by example, field shortcut of pages TCA
- try to edit a Page record of type shortcut
- check the JS console
Updated by Gerrit Code Review about 2 months ago
- Status changed from New 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/+/84897
Updated by Garvin Hicking about 2 months ago
This is actually a nasty bug. When this TCA config option is enabled, the HTML structure would NOT emit this HTML:
$html[] = '<div class="form-wizards-items-aside form-wizards-items-aside--move">'; $html[] = '<div class="btn-group-vertical">';
but CLOSE it afterwards. This leads to a malformed HTML construct. In your v11 case this seems to lead to a javascript error. In my v12 and v13 environment it actually leads to being unable to save the record at all. Any changes to the record in FormEngine will not have an effect, and content will not be saved.
Updated by Garvin Hicking about 2 months ago
I reproduced this in v12 and v13 by adding this to a sitepackage extension:
$GLOBALS['TCA']['pages']['columns']['shortcut']['config']['hideDeleteIcon'] = true;
and then editing the record in the backend on any page of type "shortcut". With the applied TCA, no data is persisted at all. Removing the TCA assignment will lead to a proper HTML structure.
Updated by Gerrit Code Review about 2 months 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/+/84897
Updated by Gerrit Code Review about 2 months 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/+/84960
Updated by Gerrit Code Review about 2 months 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/+/85012
Updated by Garvin Hicking about 2 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d37f0d8262211c9ae1340e68abbf53de989823f4.