[wp-trac] [WordPress Trac] #60162: Navigation block rending content from post with shared ID
WordPress Trac
noreply at wordpress.org
Thu Dec 28 14:05:36 UTC 2023
#60162: Navigation block rending content from post with shared ID
--------------------------+-----------------------------
Reporter: dsteersf1 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Menus | Version: 6.4.2
Severity: normal | Keywords:
Focuses: template |
--------------------------+-----------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60162>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list