Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu Items missing after import with PHP 7.0 #63

Open
andi-blafasl opened this issue Oct 22, 2017 · 0 comments
Open

Menu Items missing after import with PHP 7.0 #63

andi-blafasl opened this issue Oct 22, 2017 · 0 comments

Comments

@andi-blafasl
Copy link

Hi,
This is no issue with your test data, but I think it would be a good place to document the issue. Maybe some other users will hit the Bug when importing the test data. The bug is in the current WordPress importer plugin when using it with PHP 7.0
During the Import of the XML there is no error message displayed and the importer finishes without problems. Everything is imported, including the menus them self, but they are empty!
The Bug is documented here https://core.trac.wordpress.org/ticket/36281 and https://wordpress.org/support/topic/fails-to-export-or-import-menu-items-when-using-php7/

To fix it you have to change the file wp-content/plugins/wordpress-importer/wordpress-importer.php at line 884

from

$$meta['key'] = $meta['value'];

to

${$meta['key']} = $meta['value'];

Just add the two brackets and you are good to go.

I tested this on my wordpress 4.8.2 running on Ubuntu 16.04 with php 7.0

Hope this will help any future user to save some time searching for a solution

Regards,
Andreas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant