Opened 15 months ago
#60162 new defect (bug)
Navigation block rending content from post with shared ID
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.4.2 |
Component: | Menus | Keywords: | |
Focuses: | template | Cc: |
Description
Hello,
I believe I've found a somewhat niche issue. I have a wordpress multisite with four sites housed within it. I recently came across an issue where on one of my archive pages for an event content type, on one of the sites only, the header (leveraging a template part with a navigation block inside) is rendering content from one of the pages within the result list. This archive is leveraging cross site indexing powered by elasticpress to search and return content from this content type from all four sites in one archive page.
After some investigation, I found that the ID of the navigation matched that of one of the events published on a separate site and that the post_content for that event is being rendered in place of the post_content of the wp_navigation object which has the matching ID. This seems to be a very rare condition however it might be beneficial to have some kind of post_type check before render since this is a possible issue.
Screenshot of the header with the navigation being replaced by page content from one of the events