Skip to content

fix(SiteSearch): URL-mapped content renders same HTML for all contentlets due to page cache collision#34879

Open
dsolistorres wants to merge 1 commit intomainfrom
issue-34130-fix-title-site-search-indexes
Open

fix(SiteSearch): URL-mapped content renders same HTML for all contentlets due to page cache collision#34879
dsolistorres wants to merge 1 commit intomainfrom
issue-34130-fix-title-site-search-indexes

Conversation

@dsolistorres
Copy link
Contributor

Closes #34130

Proposed Changes

  • Set WebKeys.WIKI_CONTENTLET_INODE in HTMLPageAssetAPIImpl.getHTML() method. VelocityLiveMode.buildCacheParameters() reads WIKI_CONTENTLET_INODE as a component of the page cache key. Since it was always null, every URL-mapped contentlet of the same content type produced an identical cache key — so the first contentlet's rendered page was cached and returned for all subsequent ones. With the fix in place, the page cache key is unique per contentlet, so there are not cache collision for different URL mapped items.
  • A new test method urlMapGeneratesDifferentHTMLPerContentlet has been added to URLMapBundlerTest class. The test that creates two URL-mapped contentlets with distinct field values, runs the bundler, and asserts each generated HTML file contains its own unique value.

Checklist

  • Tests

…ache collision for URL-mapped content (#34130)

HTMLPageAssetAPIImpl.getHTML() never set WIKI_CONTENTLET_INODE, causing
VelocityLiveMode to build identical cache keys for all contentlets of the
same URL map content type — returning the first rendered HTML for all.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area : Backend PR changes Java/Maven backend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[DEFECT] Incorrect and repeated titles for Site Search results [Url Mapped Content]

2 participants