If you are prompted that a fatal error has been encountered when you open the WordPress customization and background menu, it is similar to:
Fatal error: Uncaught Exception: Supplied nav_menu_item value missing property: description in xxxxxxxxxx/wp-includes/customize/class-wp-customize-nav-menu-item-setting.php:183
You can try to solve it with the following code.
Add code to the current topic function template functions.php:
add_filter('wp_get_nav_menu_items', 'my_wp_get_nav_menu_items', 10, 3); function my_wp_get_nav_menu_items($items, $menu, $args) { foreach($items as $key => $item) $items[$key]->description = ''; return $items; }
After that, the error of opening the custom theme menu again disappears, but the code must remain in the theme. The problem still exists after removal.
Another solution is to delete all the menus previously created in the background to completely solve this problem, and then recreate the menu. I have never tried this method. If you have children's shoes with similar problems, you can try it without any loss.
Most of the articles on this site are original and used for personal learning records, which may be helpful to you, for reference only!