Bugfix/4012 Correct closest page with template in rootline logic and refactor repository#4355
Bugfix/4012 Correct closest page with template in rootline logic and refactor repository#4355wazum wants to merge 2 commits intoTYPO3-Solr:mainfrom
Conversation
|
The example in that pull-requiest is not the same as in issue, it is reversed(roots without templates in top and no-roots with templates on bottom). To your issue, which should work currently without changes: EXT:solr requires a root page with template to work at all. @wazum Please try the suggestion without your change and with. |
|
Hm, that's exactly my problem as described in the issue:
And this is solved with this pull request. |
What this PR does
This PR addresses issue #4012 by:
Correcting the logic for finding the closest page with an active system template within a given rootline.
* Ensured that the rootline data provided to the
SystemTemplateRepositoryis interpreted correctly (root page first, current page last).* Verified that the sorting logic correctly identifies the template on the current page or its nearest ancestor as the "closest".
* Updated unit tests to reflect the correct rootline structure and expected outcomes.
How to test
SystemTemplateRepositoryTest.phppass.Fixes: #4012