Project

General

Profile

Actions

Bug #98436

closed

Can't edit record (stuck) if hideDeleteIcon is set.

Added by Ian Solo about 2 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2022-09-26
Due date:
% Done:

100%

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

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

Actions #1

Updated by Gerrit Code Review 5 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

Actions #2

Updated by Garvin Hicking 5 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.

Actions #3

Updated by Garvin Hicking 5 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.

Actions #4

Updated by Gerrit Code Review 5 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

Actions #5

Updated by Gerrit Code Review 5 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

Actions #6

Updated by Gerrit Code Review 5 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

Actions #7

Updated by Garvin Hicking 5 months ago

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

Updated by Benni Mack 5 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF