[BUGFIX] Prevent duplicate page tree items when entry points intersect
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. Resolves: #96512 Resolves: #97774 Related: #96367 Releases: main, 11.5, 10.4 Change-Id: I65439011b894f05faef9cb507d905b3d7d3b709f Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75223 Tested-by:core-ci <typo3@b13.com> Tested-by:
Stefan Bürk <stefan@buerk.tech> Reviewed-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- typo3/sysext/backend/Classes/Tree/Repository/PageTreeRepository.php 5 additions, 0 deletions...xt/backend/Classes/Tree/Repository/PageTreeRepository.php
- typo3/sysext/backend/Tests/Functional/Controller/Page/TreeControllerTest.php 2 additions, 50 deletions...d/Tests/Functional/Controller/Page/TreeControllerTest.php
- typo3/sysext/backend/Tests/Functional/Tree/Repository/Fixtures/PageTree.csv 9 additions, 0 deletions...nd/Tests/Functional/Tree/Repository/Fixtures/PageTree.csv
- typo3/sysext/backend/Tests/Functional/Tree/Repository/Fixtures/Tree/NormalizeTreeTrait.php 68 additions, 0 deletions...onal/Tree/Repository/Fixtures/Tree/NormalizeTreeTrait.php
- typo3/sysext/backend/Tests/Functional/Tree/Repository/PageTreeRepositoryTest.php 239 additions, 0 deletions...sts/Functional/Tree/Repository/PageTreeRepositoryTest.php
Please register or sign in to comment