Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#36281 closed defect (bug) (fixed)

Importer Fails to import menu items in PHP7

Reported by: mightyturtle's profile mightyturtle Owned by: dd32's profile dd32
Milestone: WordPress.org Priority: normal
Severity: critical Version: 4.0
Component: Import Keywords: has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

The WordPress Importer plugin fails to import menu items at all with PHP 7 (any WP version). It's a pretty quick fix, though.

I noticed this as part of writing a fix for the importer on wp-cli:
https://github.com/wp-cli/wp-cli/pull/2545#issuecomment-199026539

But it was noticed by others, a couple months ago, and a fix provided:
https://wordpress.org/support/topic/importer-fails-to-import-menu-items-in-php7?replies=6

Since PHP7 has now been officially released for a few months, we're going to see more and more PHP7 installs pop up.

To sum it up:
wordpress-importer.php on line 798
Change:

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

To:

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

Attachments (1)

wordpress-importer.patch (464 bytes) - added by mensmaximus 7 years ago.

Download all attachments as: .zip

Change History (26)

#1 @SergeyBiryukov
9 years ago

  • Description modified (diff)
  • Milestone changed from Awaiting Review to WordPress.org

This ticket was mentioned in Slack in #core by ocean90. View the logs.


9 years ago

This ticket was mentioned in Slack in #core by netweb. View the logs.


8 years ago

This ticket was mentioned in Slack in #core by dd32. View the logs.


8 years ago

#5 @netweb
8 years ago

  • Owner set to boonebgorges
  • Status changed from new to assigned

Pull request: https://github.com/boonebgorges/wordpress-importer/pull/1

@boonebgorges I was going to mark this as resolved but I see the pull request was closed and not merged

#6 @dd32
8 years ago

#38051 was marked as a duplicate.

This ticket was mentioned in Slack in #forums by sergey. View the logs.


8 years ago

#8 @dd32
8 years ago

#40596 was marked as a duplicate.

#9 @RavanH
7 years ago

Amazing... such a simple fix, even a pull request, and still after 15 months it's not fixed.

I'd say the WordPress Importer is a pretty essential part of WordPress even if it's 'just' a plugin. And PHP7 should be completely supported by now, no?

If there's no one to take care of this plugin, just let me know :)

#10 @PowerKiKi
7 years ago

  • Keywords close added
  • Resolution set to worksforme
  • Status changed from assigned to closed

#11 @danielbachhuber
7 years ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

@PowerKiKi Did it make it into a tagged release of the importer?

#12 @PowerKiKi
7 years ago

My bad, I didn't check. It didn't got released :-/

#13 @VlooMan
7 years ago

Isn't there anyone who could actually release the fixed version? This has been fixed a YEAR ago on 29 Aug 2016 and still no releas?!!

Version 0, edited 7 years ago by VlooMan (next)

#14 @mensmaximus
7 years ago

  • Keywords has-patch added; close removed

I have updated the patch. So hopefully we will see an update soon.

#15 follow-up: @blafasl
7 years ago

  • Severity changed from normal to critical

Please release the fix for PHP 7.0! I just spend 5 Hours with several xml export/import tests searching for a solution.

This bug is annoying, because I initially doubted the XML file and did not expect such a simple error with WordPress. Since the error only occurs with PHP 7 and no error message is displayed during the import, it was very difficult to find information about it on the Internet.

I think this Bug is critical, because you can not rely on the export/import function when migrating your site from one Wordpress installation to another.

This ticket was mentioned in Slack in #core by ravanh. View the logs.


7 years ago

#17 in reply to: ↑ 15 @greggdavis
7 years ago

I second that! I just spent several hours to find this little fix too.

Replying to blafasl:

Please release the fix for PHP 7.0! I just spend 5 Hours with several xml export/import tests searching for a solution.

This bug is annoying, because I initially doubted the XML file and did not expect such a simple error with WordPress. Since the error only occurs with PHP 7 and no error message is displayed during the import, it was very difficult to find information about it on the Internet.

I think this Bug is critical, because you can not rely on the export/import function when migrating your site from one Wordpress installation to another.

#18 @RavanH
7 years ago

Posted the request on https://make.wordpress.org/chat/ and https://wordpress.org/support/plugin/wordpress-importer but got no answer. No one seems to care :(

This ticket was mentioned in Slack in #core by danielbachhuber. View the logs.


7 years ago

#20 @danielbachhuber
7 years ago

@boonebgorges @dd32 I'd love to help move this forward. Let me know what I can do.

This ticket was mentioned in Slack in #meta by chanthaboune. View the logs.


7 years ago

#22 @dd32
7 years ago

  • Owner changed from boonebgorges to dd32
  • Status changed from reopened to accepted

I'll make a release of the plugin from the new location of the importer: https://github.com/WordPress/wordpress-importer/ in the next couple of days.
edit: It'll be done this week - Week of Feb 12th

Last edited 7 years ago by dd32 (previous) (diff)

#23 @RavanH
7 years ago

@dd32 thanks for picking this up :)

#24 @ocean90
7 years ago

#43402 was marked as a duplicate.

#25 @ocean90
7 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

Version 0.6.4 includes the fix for this and is now available: https://wordpress.org/plugins/wordpress-importer/

Note: See TracTickets for help on using tickets.