Review main Merged

74258[BUGFIX] Prevent duplicate page tree items when entry points intersect

Nikita Hovratov CR +2 V +2 Hard +324 −50 updated 07/25/22, 21:14

Commit message

In a scenario, where a backend user has two entry
points, in which the second one intersects the first
one (is a direct sub-page), pages were shown
multiple times.

The reason behind this was, that inside
PageTreeRepository->groupAndSortPages() every page
was added regardless if it was already added in a
previous run. This is the case, when the same pages
are found in different depth levels.

E.g.

1 - Home (DB mount 1)
  2 - Page 1
  2 - Page 2 (DB mount 2)
    3 - Subpage 1 // will be added for level 2 and 3
    3 - Subpage 2

To prevent this, a guard clause was added, which
checks whether the page was already added by
comparing the uid value.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Silvia Bigler +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Silvia Bigler +1
    • core-ci +1 CI

Issues 3

Files 5

Review log 2130

Show 35 earlier messages
  1. Nikita Hovratov uploaded patch set 1 04/08/22, 15:51

  2. core-ci voted on patch set 1 V -1 04/08/22, 16:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25847

  3. Nikita Hovratov uploaded patch set 2 04/08/22, 16:29

  4. core-ci voted on patch set 2 V +1 04/08/22, 16:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/25849

  5. Stefan Bürk rebased onto patch set 3 07/07/22, 21:25

  1. core-ci voted on patch set 3 V +1 07/07/22, 21:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28732

  2. Nikita Hovratov commented on patch set 3 07/07/22, 21:47

    thanks for rebasing
  3. Simon Schaufelberger commented on patch set 3 07/08/22, 02:15

    NormalizeTreeTrait.php:12

    annotations can be dropped if they don't add any meaningful information
  4. Nikita Hovratov uploaded patch set 4 07/08/22, 05:32

  5. Nikita Hovratov commented on patch set 4 07/08/22, 05:33

    NormalizeTreeTrait.php:12 Reply

    Done
  6. core-ci voted on patch set 4 V +1 07/08/22, 05:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28738

  7. Stefan Bürk commented on patch set 4 07/08/22, 20:45

    PageTree.csv:3

    Can we use "real world" sorting values for pages fixture, instead of "simplified" sortings ?
  8. Simon Schaufelberger wrote 07/08/22, 20:57

    Removed cc Simon Schaufelberger.
  9. Nikita Hovratov uploaded patch set 5 07/09/22, 17:11

  10. Nikita Hovratov commented on patch set 5 07/09/22, 17:11

    PageTree.csv:3 Reply

    Done
  11. core-ci voted on patch set 5 V +1 07/09/22, 17:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28824

  12. Stefan Bürk commented on patch set 5 CR -1 07/09/22, 19:14

    On it ...
    Let's add 10.4 - patch applies without hassle, and so people can at least use composer patches until a new 10.4 release is published. It's also lightweight enough.

    NormalizeTreeTrait.php:4

    MIssing File header...

    NormalizeTreeTrait.php:5

    "Fixture" classes should resists under a "Fixture" folder to have a separation from pure test case files.

    PageTreeRepositoryTest.php:4

    Missing file header ...
  13. Stefan Bürk uploaded patch set 6 07/09/22, 19:41

  14. Stefan Bürk commented on patch set 6 07/09/22, 19:42

    Reply

    Done

    NormalizeTreeTrait.php:4 Reply

    Done

    NormalizeTreeTrait.php:5 Reply

    Done

    PageTreeRepositoryTest.php:4 Reply

    Done
  15. core-ci voted on patch set 6 V -1 07/09/22, 19:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28825

  16. core-ci voted on patch set 6 V +1 07/09/22, 19:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/28825

  17. Stefan Bürk voted on patch set 6 V +1 CR +1 07/09/22, 20:00

  18. Stefan Bürk rebased onto patch set 7 07/18/22, 21:54

  19. core-ci voted on patch set 7 V -1 07/18/22, 22:06 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29342

  20. Nikita Hovratov uploaded patch set 8 07/19/22, 07:14

  21. core-ci voted on patch set 8 V +1 07/19/22, 07:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/29349

  22. Stefan Bürk voted on patch set 8 V +1 CR +1 07/19/22, 07:53

  23. Silvia Bigler voted on patch set 8 V +1 CR +1 07/20/22, 09:35

  24. Stefan Bürk voted on patch set 8 V +2 CR +2 07/25/22, 21:14

  25. Stefan Bürk merged patch set 9 07/25/22, 21:14