Bug #98436
closed
Can't edit record (stuck) if hideDeleteIcon is set.
Added by Christian Toffolo almost 2 years ago.
Updated about 1 month ago.
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
- Status changed from New to Under Review
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.
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.
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF