WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#16801 closed defect (bug) (duplicate)

Navigation disappears with Notices/Warnings

Reported by: nhuja Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

When you add a menu item from a theme that has custom post types (Custom Post Type menu item) and then move to another theme that doesn't have the CPT, the menu disappears and gives notices / errors. Until we go back to that theme and remove that menu item, you cannot get the menu in client side nor can visit the Appearance => Menus page in admin.

Change History (5)

comment:1 @nhuja4 years ago

Heres exact errors I get

Notice: Trying to get property of non-object in /Users/indreni/Sites/wordpress/wp-includes/nav-menu.php on line 572

Notice: Trying to get property of non-object in /Users/indreni/Sites/wordpress/wp-includes/nav-menu.php on line 572

Warning: preg_split() expects parameter 2 to be string, object given in /Users/indreni/Sites/wordpress/wp-includes/formatting.php on line 34

comment:2 @nhuja4 years ago

On the admin, I get this error

Notice: Trying to get property of non-object in /Users/indreni/Sites/wordpress/wp-includes/nav-menu.php on line 572

Notice: Trying to get property of non-object in /Users/indreni/Sites/wordpress/wp-includes/nav-menu.php on line 572

Notice: Trying to get property of non-object in /Users/indreni/Sites/wordpress/wp-includes/nav-menu.php on line 572

Notice: Trying to get property of non-object in /Users/indreni/Sites/wordpress/wp-includes/nav-menu.php on line 572

Catchable fatal error: Object of class WP_Error could not be converted to string in /Users/indreni/Sites/wordpress/wp-includes/formatting.php on line 44

comment:3 @garyc404 years ago

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

Duplicate of #13598

comment:4 @garyc404 years ago

Sorry, typo, duplicate of #13958

comment:5 @scribu4 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.