[wp-trac] [WordPress Trac] #63484: Attempt to read property "name" on bool - wp-admin/nav-menus.php :1221

WordPress Trac noreply at wordpress.org
Fri May 30 17:03:37 UTC 2025


#63484: Attempt to read property "name" on bool - wp-admin/nav-menus.php :1221
--------------------------+------------------------------
 Reporter:  apermo        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:  reporter-feedback =>


Comment:

 The ticket could be closed as a duplicate if this only needs to remove the
 PHP notice, though I do not think the cause is exactly the same.

 If you want to look into it further, your 'nav_menu_locations' `theme_mod`
 might refer to a menu that does not exist (anymore). You could:
 1. Temporarily add `print_r($locations); print_r($menu_locations);` before
 the `foreach` loop on line 1202, inside the `menu-theme-locations`
 fieldset. (`var_dump()` should work too, but I think `print_r()` looks
 cleaner.)
 2. Edit the Spanish menu, and compare the arrays that appear in the
 'Display location' section. You likely will have the same key (such as
 'primary') in both arrays.
 3. Check each of your menus for the integer(s) assigned in the
 `$menu_locations` array. You could find the menu IDs in the `select-menu-
 to-edit` dropdown, or you could select each menu and find the `menu=` ID
 in the URL.
 4. Remove the temporary code.

 If `$menu_locations` includes a menu that has been removed, that could be
 a separate issue because removing the menu hopefully would update the
 setting.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63484#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list