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
Open
fix(SiteSearch): URL-mapped content renders same HTML for all contentlets due to page cache collision#34879dsolistorres wants to merge 1 commit intomainfrom
dsolistorres wants to merge 1 commit intomainfrom
Conversation
…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>
gortiz-dotcms
approved these changes
Mar 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #34130
Proposed Changes
WebKeys.WIKI_CONTENTLET_INODEinHTMLPageAssetAPIImpl.getHTML()method.VelocityLiveMode.buildCacheParameters()readsWIKI_CONTENTLET_INODEas 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.urlMapGeneratesDifferentHTMLPerContentlethas been added toURLMapBundlerTestclass. 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