Review main Merged

87168[BUGFIX] Ignore invalid tree state in page tree drag actions

Andreas Nedbal CR +2 V +2 Easy +4 −2 updated 11/22/24, 15:06

Commit message

The expansion state of tree nodes is persisted in localStorage.
When all children of a node are removed (either locally or by
someone else) the state is still present and the nodes are
"enhanced" with the broken state later. This prevents dragging
elements after the now childless nodes.

This can be fixed manually with either clearing the tree state
localStorage or using the "Collapse all tree items" option, which
sets new state.

This fix in code however checks if the condition that sets the
expanded state again is only ever called if the to-be-enhanced
node actually has children, effectively ignoring the broken
state.

Review

  • Code review CR +2 Done
    • Andreas Nedbal +2
    • Christian Kuhn +1
    • Andreas Kienast +1
  • Verified V +2 Done
    • Andreas Nedbal +2
    • Christian Kuhn +1
    • Andreas Kienast +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 68

  1. Andreas Nedbal uploaded patch set 1 11/22/24, 11:10

  2. Andreas Nedbal updated the commit message in patch set 2 11/22/24, 11:11

  3. core-ci voted on patch set 1 V +1 11/22/24, 11:18 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70031

  4. core-ci voted on patch set 2 V +1 11/22/24, 11:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/70032

  5. Andreas Kienast voted on patch set 2 CR +1 V +1 11/22/24, 13:38

  6. Christian Kuhn voted on patch set 2 CR +1 V +1 11/22/24, 13:57

  7. Andreas Nedbal voted on patch set 2 CR +2 V +2 11/22/24, 14:58

  8. Andreas Nedbal merged patch set 3 11/22/24, 15:06