Inconsistent contentObject.path for File Assets Due to Metadata Cache Misses
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
In the customer’s UAT environment, the path property under contentObject for some file assets (PDFs) is intermittently missing in Elasticsearch query results. This behavior causes incomplete sitemap generation.
While trying to open a file and close it seems to be caching and reflects the data.
File asset metadata uses BinaryMap with lazy loading and caching.
path is pulled from this metadata, which can result in cache misses under certain conditions.
This explains why editing or viewing the asset in the content editor repopulates the value temporarily.
Issue is not reproducible on demo.dotcms.com, but was reproduced locally using the customer’s exported UAT content and assets.
Steps to Reproduce
Import [UAT asset + contentlet dump (Google Drive)]
Run the sitemap VTL code using ${currentDocument.contentObject.path}.
Observe: Some PDFs will return the full path; others will return blank.
Inspect content metadata via the Browse UI — the correct path is still visible there.
#set($contentHydrated = $dotcontent.findHydrated($currentDocument.identifier))
https://${host.externalizationDomain}${contentHydrated.contentObject.path}
Data dump : https://drive.google.com/file/d/19kLO6mzIzt-4q8NPUkSX1pp\_A-KD7pnh/view
Acceptance Criteria
Investigate consistency of the path property generation in BinaryMap caching mechanism.
Ensure contentObject.path is always populated in ES index or provide a reliable fallback strategy.
Consider:
Eager metadata loading for file assets on index
Background job to warm BinaryMap cache
Option to enforce path hydration for specific content types (like FileAssets)
dotCMS Version
Evergreen
Proposed Objective
Core Features
Proposed Priority
Priority 3 - Average
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
https://dotcms.freshdesk.com/a/tickets/31905
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
#set($contentHydrated = $dotcontent.findHydrated($currentDocument.identifier))
https://${host.externalizationDomain}${contentHydrated.contentObject.path}
Sub-Tasks & Estimates
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by importing the referenced UAT asset and contentlet dump, then run the sitemap VTL using currentDocument.contentObject.path and compare results with the Browse UI metadata. Trace how FileAsset metadata is loaded through BinaryMap and how findHydrated affects contentObject.path during Elasticsearch indexing. Done means the path is consistently populated for file assets or a reliable fallback is documented and verified against the reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, java
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100