• Hi,

    Looks like menu is not imported. I’ve made some tests and everything works if export was made in WordPress 4.5.4. But if you’re on WordPress 4.6.1 trying to import XML that was made in WordPress 4.6.1 it just fails. No menu imported.

    It’s not PHP 7 issue for sure, because I tested on PHP 5.6

    Best Regards!
    Ramzesimus

Viewing 13 replies - 1 through 13 (of 13 total)
  • I can confirm this on 4.6.1

    I’m in 4.6.1 with PHP7 and I try change this code and working again:
    Line 884 $$meta['key'] = $meta['value']; change ${$meta['key']} = $meta['value'];

    Seem that syntax was removed in 5.6 too.

    Thread Starter ramzesimus

    (@ramzesimus)

    @anhskohbo It’s not PHP version related for sure. Tried on WP4.5.4 and menu imported, it’s not work on WP4.6.1 – menu not imported.

    I am having the same issue. WP 4.6.1 and tested on PHP 5.6.10.

    I’d also like to see a fix for this issue. Running WP 4.6.1, PHP7, NGINX. I’m loading plugins via composer so making edits to the plugin is not an option.

    • This reply was modified 8 years, 1 month ago by ilana.mullin.

    I tried @anhskohbo’s recommendation but it did not resolve the issue. I did notice that there is a difference between an older export file and one I generated today.

    For example:

    Older export file (XML):
    <wp:term><wp:term_id>46</wp:term_id><wp:term_taxonomy>nav_menu</wp:term_taxonomy><wp:term_slug>social-butterfly</wp:term_slug><wp:term_name><![CDATA[Social Butterfly]]></wp:term_name></wp:term>

    Same theme, export file from today:

    <wp:term><wp:term_id>49</wp:term_id><wp:term_taxonomy>nav_menu</wp:term_taxonomy><wp:term_slug><![CDATA[social-butterfly]]></wp:term_slug><wp:term_name><![CDATA[Social Butterfly]]></wp:term_name>
    </wp:term>

    It appears as if the <wp:term_slug> is wrapping the text in with <![CDATA[]]>. I don’t know if this helps or not. This was just my first quick pass at comparing the two files.

    I’m in same situation in my new theme , I tried to importer to import my demos using xml.gz file it didn’t work in menu items , but when I use .xml file the menu items are imported well , advice please,

    When this happens, make sure that the receiving site has menus with matching slugs. In my case, the receiving site had NO menus, so I just created empty menus with the exact same names (slugs) and then the import filled up the menus as expected.

    this is a PHP 7.0 problem, i switched to PHP 5.6 for my host account and the menus import just fine. So nice to have yet another compatibility problem. It would be nice if someone fixed this because there is no point to having a feature in WordPress if doesnt work in the newest version of PHP.

    Menu item skipped due to missing menu slug

    Anyone have to solution? please inform us. My project Is complete But i can’t import it in another site.

    Dave

    (@dcutri500)

    I just gave you the answer above, salam91. You have to create empty menus on the receiving site. And make sure they have the same exact names as the ones you are importing.

    dcutri500 thank you.

    I created a menu
    register_nav_menus( array(
    ‘header_menu’ => ‘Apex Header Menu’,
    ) );

    When My Menu Name is Apex Header Menu. As you said, Before i import my file in new theme first a created empty menu with this ‘Apex Header Menu’ name. Then I imported the theme. But it won’t work.
    What can I do..??

    FWIW, dcutri500’s response above helped me. I had to create an empty menu first. (Ideally the importer should create the menu if it’s not there, but this was a decent workaround for me.)

    When this happens, make sure that the receiving site has menus with matching slugs. In my case, the receiving site had NO menus, so I just created empty menus with the exact same names (slugs) and then the import filled up the menus as expected.

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