Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#13345 closed defect (bug) (fixed)

Cannot create nav menu with name that matches existing term slug

Reported by: ryan Owned by:
Milestone: 3.0 Priority: normal
Severity: blocker Version:
Component: Menus Keywords:
Focuses: Cc:


"A term with the slug provided already exists." greets you if you try to create a menu that happens to match the slug of an existing term in any taxonomy. [14229] removed the taxonomy arg passed to is_term() so 'term_slug_exists' is thrown even though the term doesn't exist for the nav_menu taxonomy. We might need to remove passing the slug to wp_insert_term() from wp_create_nav_menu().

Attachments (1)

no_menu_slug_on_new_menu.13345.diff (415 bytes) - added by filosofo 6 years ago.

Download all attachments as: .zip

Change History (4)

#1 @filosofo
6 years ago

There's a check at the top of wp_create_nav_menu that should be catching this and erroring earlier.

#3 @ryan
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [14590]) Don't pass a slug when creating anew menu. This prevents creating a menu whose slug matches a different term in another taxonomy. Props filosofo. fixes #13345

Note: See TracTickets for help on using tickets.