[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
Wed May 21 16:46:17 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 SirLouen):
Replying to [comment:9 nuadagency]:
> **Why your reproduction isn’t working**
> In your test, you're using a custom post type and a taxonomy attached to
that same CPT. That relationship is expected in WordPress and doesn't
replicate the bug.
>
> You're not creating the required mismatch of unrelated object types.
This is not correct
In my last reproduction "Test Tax" was a `post_type=post` and the "b" was
a Taxonomy of type `testing`.
I only created a CPT because I wanted to simplify the demonstration that
both ID (for post and for taxonomy testing) where the same (15) without
leaving the screen.
According to your mismatch theory in my example, post, and taxonomy
testing are completely unrelated.
I've also tried with `post_type=page` and my taxonomy `testing` with the
same ID and still not finding this problem.
I'm not using your exact WooCommerce example for testing because this is
just one use-case that served me as an example of what I should be
testing, but to do a real testing, it has to prove to be generalizable
under equivalent conditions. Because maybe the problem is only related
with WooCommerce `product_cat` (unlikely but possible)
I've provided the code I'm using, so if you like, you can dig a bit with
it and compare.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63261#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list