Changing Custom Menu Title Changes Tag Name
-
When creating a custom menu that happens to have the same name as a tag that exists on your site, if you rename the custom menu, the tag (and its slug) are changed as well.
To recreate the issue:
- Create a few tags on your site with some posts corresponding to those tags.
- Create a custom menu which has the same name as one of those tags
- Save all changes and verify that tags and menus are working properly
- Change the name of the menu
- Attempt to view the tag page for the tag which previously had the same name as the menu. You should find a 404 page and also see that the tag (and its slug) have been changed to correspond with the custom menu name change.
This doesn’t seem like expected functionality. Seems like a bug.
-Scott
-
If you can confirm this using TwentyTen and no plugins, it might be worth posting in Trac.
I can confirm that this is an issue and a disturbing one. It basically boils down to the slug. On menus you can’t specify a slug. If you happen to create a menu with the title that matches a slug it gets the same id in the database. Later if you change the tag or menu title they both change. This can cause problems if you are asking for a menu by name or have links to /tag/tag-name. I don’t believe naming your menus some unorthodox name should be a requirement. Categories can get in the mix as well if you name a menu the same as a category slug and then rename either. Seems the menu creation isn’t creating its own taxonomy record to set itself a part from existing tags or categories.
Submitted a ticket
http://core.trac.wordpress.org/ticket/16936
Not sure if this is expected behavior or not. I could see one use for it, when displaying a category/tag post list being able to easily grab a corresponding menu if one exists. However, that seems more handy than a common need.
The topic ‘Changing Custom Menu Title Changes Tag Name’ is closed to new replies.