Bug #91779
closed"Collapse all" and "Expand All" in pages menu do not work.
100%
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
Updated by Johannes Schlier over 4 years ago
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).
Updated by Oliver Hader over 4 years ago
- Status changed from New to Needs Feedback
What's the exact version you're using?
Updated by Oliver Hader over 4 years ago
- Related to Bug #86818: Page tree is not accessible via tab key anymore added
Updated by Oliver Hader over 4 years ago
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.
Updated by Johannes Schlier over 4 years ago
I encountered this problem using TYPO3 10.4.5
Updated by Gerrit Code Review over 4 years ago
- Status changed from Needs Feedback to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65065
Updated by Michael Telgkamp over 4 years ago
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?
Updated by Gerrit Code Review over 4 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65065
Updated by Gerrit Code Review over 4 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65065
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch 10.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/+/65108
Updated by Michael Telgkamp over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset b13bb6d81bc6f20baf4990e3fa42bbb709a02ae1.