Skip to content

[BUGFIX] Don't leak page title state between indexing sub-requests#4701

Open
amirarends wants to merge 1 commit into
TYPO3-Solr:mainfrom
amirarends:bugfix/page-title-state-leak-in-process-indexing
Open

[BUGFIX] Don't leak page title state between indexing sub-requests#4701
amirarends wants to merge 1 commit into
TYPO3-Solr:mainfrom
amirarends:bugfix/page-title-state-leak-in-process-indexing

Conversation

@amirarends

Copy link
Copy Markdown
Contributor

What this pr does

Since the unified in-process indexing (#4559), IndexingService renders many pages via frontend sub-requests within one long-lived PHP process. PageTitleProviderManager is a stateful singleton whose per-provider cache still holds the titles of the previously indexed page when the next page's document is built.

All other document fields (content, url, ...) stay correct, which makes the corruption hard to spot. Verified on a production multi-site installation: documents sporadically carried the title of a page indexed earlier in the same IndexQueueWorkerTask run.

How to test

Tests/Unit/Typo3PageContentExtractorPageTitleTest pins both behaviors:

  • getPageTitleDoesNotLeakTitleStateOfPreviouslyIndexedPage: a stale cache entry from another page must not win over the current page's record title.
  • getPageTitleUsesPersistedTitleStateOfCurrentPage: persisted per-page state (page cache row) takes precedence, keeping plugin-generated titles intact for cached pages.

Both tests fail against the previous implementation.

Fixes: #4700

IndexingService renders many pages via frontend sub-requests within one long-lived PHP process. PageTitleProviderManager is a stateful singleton whose per-provider cache still holds the titles of the previously indexed page when the next page's document is built.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] In-process indexing leaks the page title of a previously indexed page into subsequent page documents

1 participant