[wp-trac] [WordPress Trac] #63261: Menu items incorrectly marked as current when page and taxonomy share the same object_id
WordPress Trac
noreply at wordpress.org
Thu May 22 11:02:44 UTC 2025
#63261: Menu items incorrectly marked as current when page and taxonomy share the
same object_id
-------------------------------------------------+-------------------------
Reporter: nuadagency | Owner: audrasjb
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.9
Component: Menus | Version: 6.7.2
Severity: normal | Resolution:
Keywords: has-patch reporter-feedback needs- | Focuses:
test-info | accessibility
-------------------------------------------------+-------------------------
Comment (by nuadagency):
Thanks @SirLouen — I went through your test setup step by step and can
confirm that, under those conditions (WP 6.8.1, custom taxonomy with the
same ID as a page), the issue does not occur. So your reproduction path is
valid in proving that not all object ID collisions cause the bug.
However, I want to clarify that in the original reported instance (also
updated to 6.8.1 now), the issue still persists — specifically:
A page and a product_cat term share the same ID
Both are in the navigation menu
Visiting the product category archive (e.g., /product-category/kat/) still
results in both items being marked as current-menu-item, which is
incorrect
@audrasjb — since you mentioned earlier that you were able to reproduce
this, could you possibly share:
The exact environment/setup used for reproduction?
Any specific conditions (menu structure, object types, filters/hooks) that
triggered the bug on your end?
This could help pinpoint why it still appears in some WooCommerce
installs, but not others — even on the same WP version — and clarify
whether the root cause is in core or indirectly introduced via
plugin/theme behavior.
Thanks in advance!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63261#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list