[BUGFIX] Skip languages absent on a resolved site for queued page item#4677
[BUGFIX] Skip languages absent on a resolved site for queued page item#4677amirarends wants to merge 1 commit into
Conversation
4ccd658 to
2986c18
Compare
|
@dkd-kaehm I have reworked this PR. After thinking through your feedback and the alternatives, i have landed on the smallest possible change that resolves the reported failure mode: On reflection, how nested-site pages should be routed through the queue is a EXT:solr architecture discussion, not a bugfix scope. There are legitimate setups (shared corporate pagetrees with country/market subsites being one of them) where a single conceptual answer does not fit everyone. 👍 |
2986c18 to
8e283fc
Compare
0c90549 to
365cf5c
Compare
What this pr does
In
IndexingService::getPageSolrConnections(), intersect the connection list with the languages defined on the page's own site fetched viaSiteFinder::getSiteByPageId()before returning it. Languages that the site of queue item advertises but the site of the page does not provide are filtered out. When at least one language gets dropped, the new code logs an info entry with the queue item UID, the queue item's root page UID, the page's site identifier, and the dropped language IDs. If the page does not resolve to any siteSiteNotFoundException, the filter falls back to returning the unfiltered list, preserving the existing downstream failure mode rather than masking it here.How to test
Provided functional tests sets up two nested sites that share the same Solr backend:
The fixture pre-seeds a queue item against the outer root for a page that physically lives in the inner tree.
After running
IndexService->indexItems(), the test asserts:Without the filter, the queue item's indexed stays 0, because
indexPageItem()returns false after the caught DE/DA exceptions, which the test catches.Fixes: #4675