• Resolved tzemtz

    (@tzemtz)


    The menu issue persists in Version 3.1.2

    Warning: Undefined array key … in?wp-includes\nav-menu-template.php?on line?211

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Gregor Capuder

    (@capuderg)

    Hi @tzemtz,

    could you please provide more information?

    Does this PHP warning show up after you perform the import, or during it?

    Can you verify that the menu or menu items are actually missing after the import in the WP dashboard -> Appearance -> Menus?

    Have a nice day and happy holidays!

    Thread Starter tzemtz

    (@tzemtz)

    Thank you Gregor Capuder,

    Yes this warning show up after import.

    There are no missing items in the menu but when I delete any items from the menu the warning disappears. For example, items from default WooCommerce Pages – SHOP page, CART page. But it happens with other pages too. It’s just that some menu items don’t import correctly.

    When I use the default WordPress xml importer I do not have this problem.

    You must also select the imported menu primery otherwise the warning does not appear for example:

    register_nav_menu( ‘primary’, esc_html__( ‘Primary’, ‘my-theme’ ) );

    wp_nav_menu( array(
    ‘theme_location’ => ‘primary’,
    ‘menu_id’ => ‘primary-menu’
    ) );

    It happens with different themes and menus.

    I also tested a fresh install of WordPress.

    I use PHP 8.1

    Happy holidays!

    • This reply was modified 2 years, 2 months ago by tzemtz.
    • This reply was modified 2 years, 2 months ago by tzemtz.
    • This reply was modified 2 years, 2 months ago by tzemtz.
    Plugin Author Gregor Capuder

    (@capuderg)

    Hi @tzemtz,

    I tried to recreate this issue but I couldn’t do it. Could you please provide a small XML file for us to import, which causes this issue? Keep in mind that this is a public forum, so remove any kind of sensitive information from your import file.

    You can also use hooks in our plugin to automatically assign the menu to the menu location. More info here: https://ocdi.com/advanced-integration-guide/#after-import-custom-code-execution

    Take care!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Menu Issue’ is closed to new replies.