Fails to export or import menu items when using PHP7
-
Hi there,
I tried to export the menu (inkl. its items) from a staging site and import it into the production site, because the only new thing about the staging site ist the theme, the theme options and the menu structure.
When using php 7.0 the menu itself and the underlying pages are imported as well as any media within these pages – BUT – the menu structure is not imported, i.e. the menu items do not appear in the imported menu.
After changing back to php 5.6 the export/import works as expected: the menu including all its submenues and all of the menuitems are imported as well as the underlying pages with their media.
Could you please fix this issue? Or is it an issue in the wordpress importer?
Thanks in advance
ThomasThe page I need help with: [log in to see the link]
-
Hi,
I am checking the issue, and I will update you with the details on it.
Regards,
Moxa JoganiHi,
I also experienced the bug in the wordpress importer.
After a short research on the net I found a solution! This bug has been known since the beginning of 2016 and there is a very simple fix.
The bug report is documented at https://core.trac.wordpress.org/ticket/36281, including the solution. Unfortunately, the developers have not been able to publish the fix yet. There is even a patch for the current version of the importer plugin for 3 weeks. Where it is only two small brackets which must be set. There is even the complete plugin with the fix on github: https://gist.github.com/cfxd/824d4faeb616b50e40f1Hopefully the fix will eventually be adopted and a working version of importers published.
Regards,
AndreasThe file in the github gist is 6.1 but the latest version is 6.3.
It’s one line to change:Fixed this for me.
The import does nothing. It does not import the actual menu options.
Hi @blafasl,
Thank you for providing the fix. It did fix the issues with PHP 7, where the import of menus was not working.
Regards,
Moxa JoganiHi @bjornenblog,
Can you please let me know if the import is not working is because you are using PHP 7? Or it is not working with the lower versions of PHP also?
If you are using PHP 7, then have you tried to import after applying the fix mentioned above in the WordPress Imported plugin?
Regards,
Moxa JoganiSame thing here. Mo import of menus; it imports pages.
- The topic ‘Fails to export or import menu items when using PHP7’ is closed to new replies.