Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#25064 closed defect (bug) (fixed)

Nav Menu: Bug while assigning a new menu to an existing menu location

Reported by: ocean90's profile ocean90 Owned by: nacin's profile nacin
Milestone: 3.6.1 Priority: normal
Severity: normal Version: 3.6
Component: Menus Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

Steps to reproduce:

  • Theme with menu support
  • get_theme_mod( 'nav_menu_locations' ) needs to be empty or shouldn't include the menu location for the next steps
  • Go to Manage Locations and select Use new menu
  • Create the new menu and save it

Expected: The menu is assigned to the location.
Current: It's not assigned.

get_theme_mod( 'nav_menu_locations' ) doesn't return all registered menu locations means the isset() check fails.

Attachments (2)

25064.patch (1.5 KB) - added by ocean90 11 years ago.
25064.2.patch (2.1 KB) - added by nofearinc 11 years ago.
small optimization added in wp-includes/nav-menu.php

Download all attachments as: .zip

Change History (8)

@ocean90
11 years ago

#1 @ocean90
11 years ago

25064.patch uses get_registered_nav_menus() for the isset() check.

@nofearinc
11 years ago

small optimization added in wp-includes/nav-menu.php

#2 @nofearinc
11 years ago

  • Cc mario@… added

#3 @nacin
11 years ago

In 25195:

Nav menus: Allow assigning a new menu to an existing location when no theme setting is currently saved.

props ocean90.
see #25064, for trunk.

#4 @nacin
11 years ago

In 25196:

Use get_nav_menu_locations() in wp_delete_nav_menu().

props nofearinc.
see #25064.

#5 @nacin
11 years ago

  • Keywords commit fixed-major added

I suggest we only merge [25195] to 3.6.1.

#6 @nacin
11 years ago

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

In 25232:

Nav menus: Allow assigning a new menu to an existing location when no theme setting is currently saved.

Merges [25195] to the 3.6 branch.

props ocean90.
fixes #25064.

Note: See TracTickets for help on using tickets.