#21369 closed defect (bug) (fixed)
Duplicate current-menu-item classes in Menu when using multiple taxonomy terms with the same slug
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Menus | Version: | 3.4.1 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | lol@… |
Description
If Taxonomy-based Menu items have the same slug (regardless of Taxonomy name) classes of current-menu-item, current-menu-ancestor, etc. will be added to all Taxonomy term Menu items that have the slug of the object currently being viewed. This is not an issue with Page-based Menu items.
Test case: if you have a Category named "Test" with a slug test and also have a Tag named "Test" with a slug test and create a Menu using those two terms, viewing either archive page will result in the menu having two items with a class of current-menu-item which results in unwanted styling. This is not an issue if a Page Menu item has a slug of test.
Screenshot of Menu setup: http://d.pr/i/WtJg/5vBu91hX
Screenshot of duplicate class issue: http://d.pr/i/M4VH/4nbAdJZY
Attachments (1)
Change History (10)
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 3.5
SergeyBiryukov — 10 months ago
comment:2
SergeyBiryukov — 10 months ago
- Keywords has-patch added; needs-patch removed
comment:3
follow-up:
↓ 4
jchristopher — 10 months ago
Forgive my ignorance with this process but with a patch submitted will this fix continue to not be in place until 3.5?
Replying to jchristopher:
Forgive my ignorance with this process but with a patch submitted will this fix continue to not be in place until 3.5?
3.5 is the next major release, so it will be fixed then, yes.
You may be able to use a filter to correct the classes in the meantime.
comment:5
in reply to:
↑ 4
jchristopher — 10 months ago
Replying to nacin:
Replying to jchristopher:
Forgive my ignorance with this process but with a patch submitted will this fix continue to not be in place until 3.5?
3.5 is the next major release, so it will be fixed then, yes.
You may be able to use a filter to correct the classes in the meantime.
Great, thanks Nacin! I'll check into that.
- Owner set to nacin
- Resolution set to fixed
- Status changed from new to closed
In [22302]:
comment:9
SergeyBiryukov — 5 months ago
#23130 was marked as a duplicate.

Categories and tags with the same name share the same ID (related: #5809).
21369.patch adds a check for the queried object taxonomy.