Review main Merged

96506[BUGFIX] Prevent parent loops in category tree

Georg Ringer CR +2 V +2 Hard +296 −2 updated 11/12/26, 19:13

Commit message

When editing the parent field of a record in a tree relation to its own
table, only the record itself was unselectable. Its descendants could
still be chosen, which created a loop and detached the whole subtree
from the tree.

When the edited field is the parent field of the tree, all descendants
of the record are now resolved and marked unselectable as well. They
are looked up in the available items and in the database, so they are
also found if the displayed tree is re-rooted by starting points or
category mounts, or if an intermediate item is removed via TSconfig.

When a workspace version is edited, the live record and its
descendants are marked unselectable, as the tree lists live uids.

Trees using "childrenField" are not covered by this change.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Wouter Wolters +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Wouter Wolters +1
    • core-ci +1 CI

Issues 1

Files 5

Review log 1520

  1. Georg Ringer uploaded patch set 1 10/07/26, 19:41

  2. Georg Ringer commented on patch set 1 10/07/26, 19:41

    This change is ready for review.
  3. core-ci voted on patch set 1 V +1 10/07/26, 19:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110395

  4. Wouter Wolters commented on patch set 1 10/07/26, 19:50

    DatabaseTreeDataProvider.php:228

    Can we use strict mode here with setting 3rd param to true? Same below in the while loop
  5. Oli Bartsch uploaded patch set 2 V +1 10/26/26, 10:58

  6. Oli Bartsch commented on patch set 2 CR +1 V +1 10/26/26, 11:03

    DatabaseTreeDataProvider.php:228 Reply

    Done
  7. core-ci voted on patch set 2 V -1 10/26/26, 11:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112594

  8. Oli Bartsch rebased onto patch set 3 CR +1 V +1 10/26/26, 21:27

  9. core-ci voted on patch set 3 V +1 10/26/26, 21:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112616

  10. Oli Bartsch voted on patch set 3 CR +1 V +1 10/26/26, 22:23

  11. Simon Schaufelberger voted on patch set 3 CR +1 10/27/26, 00:32

  12. Oli Bartsch rebased onto patch set 4 CR +1 V +1 11/09/26, 20:58

  13. core-ci voted on patch set 4 V +1 11/09/26, 21:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113789

  14. Benni Mack uploaded patch set 5 V +1 11/12/26, 10:52

  15. core-ci voted on patch set 5 V +1 11/12/26, 10:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/114179

  16. Oliver Klee voted on patch set 5 V +1 11/12/26, 11:08

  17. Benni Mack voted on patch set 5 CR +1 V +1 11/12/26, 11:52

  18. Wouter Wolters voted on patch set 5 CR +1 V +1 11/12/26, 18:43

  19. Benni Mack voted on patch set 5 CR +2 V +2 11/12/26, 19:13

  20. Benni Mack merged patch set 6 11/12/26, 19:13