#16801 closed defect (bug) (duplicate)
Navigation disappears with Notices/Warnings
| Reported by: | nhuja | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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)
#2
@
15 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
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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