Project

General

Profile

Actions

Bug #91779

closed

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

Added by Elias Schneider over 4 years ago. Updated about 4 years 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 1 (0 open1 closed)

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

Actions
Actions #1

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).

Actions #2

Updated by Oliver Hader over 4 years ago

  • Status changed from New to Needs Feedback

What's the exact version you're using?

Actions #3

Updated by Oliver Hader over 4 years ago

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

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.

Actions #5

Updated by Johannes Schlier over 4 years ago

I encountered this problem using TYPO3 10.4.5

Actions #6

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

Actions #7

Updated by Michael Telgkamp over 4 years ago

  • Assignee set to Michael Telgkamp
Actions #8

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?

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

Updated by Michael Telgkamp over 4 years ago

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

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF