Bug #91779

"Collapse all" and "Expand All" in pages menu do not work.

Added by Elias Schneider 5 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Should have
Category:
Backend JavaScript
Target version:
Start date:
2020-07-10
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

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


Related issues

Related to TYPO3 Core - Bug #86818: Page tree is not accessible via tab key anymoreClosed2019-12-16

Actions
#1

Updated by Johannes Schlier 4 months 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).

#2

Updated by Oliver Hader 4 months ago

  • Status changed from New to Needs Feedback

What's the exact version you're using?

#3

Updated by Oliver Hader 4 months ago

  • Related to Bug #86818: Page tree is not accessible via tab key anymore added
#4

Updated by Oliver Hader 4 months 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.

#5

Updated by Johannes Schlier 4 months ago

I encountered this problem using TYPO3 10.4.5

#6

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

#7

Updated by Michael Telgkamp 4 months ago

  • Assignee set to Michael Telgkamp
#8

Updated by Michael Telgkamp 4 months 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?

#9

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

#10

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

#11

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

#12

Updated by Michael Telgkamp 4 months ago

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

Updated by Benni Mack 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF