Bug #91779
closed
"Collapse all" and "Expand All" in pages menu do not work.
Added by Elias Schneider over 4 years ago.
Updated over 4 years ago.
Category:
Backend JavaScript
Description
If i click on the buttons "Collapse all" and "Expand all" in the categories tab of a specific page, nothing happens.
Can you please take a look at this?
Thank you and best regards!
Elias Schneider
Junior Developer
Files
I just ran into this problem as well.
It occured after clicking "collapse all". All susequent clicks on "expand all" or "collapse all" led to the following JavaScript error:
SvgTree.js?bust=1594979006:1387 Uncaught TypeError: Cannot read property 'setAttribute' of null
at SelectTree.setExpandedState (VM1836 SvgTree.js:1387)
at SelectTree.hideChildren (VM1836 SvgTree.js:1364)
at Array.forEach (<anonymous>)
at SelectTree.collapseAll (VM1836 SvgTree.js:1410)
at TreeToolbar.collapseAll (VM1866 TreeToolbar.js:141)
at HTMLButtonElement.dispatch (VM1800 jquery.js:5242)
at HTMLButtonElement.elemData.handle (VM1800 jquery.js:5049)
Clicking on "hide/show unchecked items" restores the tree and functionality (until "collapse all" is clicked again).
- Status changed from New to Needs Feedback
What's the exact version you're using?
- Related to Bug #86818: Page tree is not accessible via tab key anymore added
Most probably related to https://review.typo3.org/c/Packages/TYPO3.CMS/+/62051
The method in question looks like
setExpandedState: function(node) {
document
.getElementById('identifier-' + this.getNodeStateIdentifier(node))
.setAttribute('aria-expanded', (node.hasChildren ? node.expanded : null));
},
Thus, the error message means element having an identifier with identifier-...
does not exist.
I'm not sure whether the mentioned change above should only be working in the page-tree.
I encountered this problem using TYPO3 10.4.5
- Status changed from Needs Feedback to Under Review
- Assignee set to Michael Telgkamp
The problem is, that the DOM nodes are generated on the fly, but the expand/collapse all did not check if the DOM node exists and tried to change the state, also for nodes not available in the DOM.
By the way, is there any way to expand the Categories tree when all nodes are collapsed (using collapse all)? I do not have the toggle arrow at the root of the category tree.
What is the expected behaviour? Should the root node not be collapsed?
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF