Make WordPress Core

Opened 11 years ago

Last modified 8 years ago

#24995 new defect (bug)

Importer does not check to see if DOM is available

Reported by: novasource's profile novasource Owned by:
Milestone: WordPress.org Priority: normal
Severity: normal Version: 3.6
Component: Import Keywords: needs-patch
Focuses: Cc:

Description

I have a WordPress network with many blogs. I exported a few posts from one blog (export file attached with some details sanitized). I then imported the posts into another blog.

Not only does the import probably do nothing, the /blogname/wp-admin/import.php page stops rendering after:

<h2>Import WordPress</h2>

That is, if you do a view source on the page, the above h2 element is the last thing you see.

Expected behavior: execution does not stop mid-page, and if there is an error, it is displayed for logged-in administrative users.

I am logged in as a network administrator.

Attachments (1)

export file.zip (32.9 KB) - added by novasource 11 years ago.

Download all attachments as: .zip

Change History (8)

#1 @novasource
11 years ago

  • Summary changed from On WordPress network, importer stops without doing anything, doesn't even write out complete page to Importer stops without doing anything, doesn't even write out complete page

I've reproduced on a non-network environment.

#2 @novasource
11 years ago

Found an error: *[Wed Sep 04 08:52:23 2013] [error] [client 129.119.70.150] PHP Fatal error: Class 'DOMDocument' not found in /var/www/campaign/wp-content/plugins/wordpress-importer/parsers.php on line 61, referer: http://[sitename]/wp-admin/admin.php?import=wordpress*

Version 0, edited 11 years ago by novasource (next)

#3 @novasource
11 years ago

  • Severity changed from normal to major
  • Summary changed from Importer stops without doing anything, doesn't even write out complete page to Importer does not advise when PHP components are missing

It is fixed by installing php-xml. There's still a problem: The importer should advise me that I have a missing library rather than just quitting during execution.

Solution found at http://wordpress.org/support/topic/plugin-import-html-pages-requires-php-xml-if-you-get-error-domdocument-not-found?replies=1.

#4 @rmccue
11 years ago

  • Severity changed from major to normal
  • Summary changed from Importer does not advise when PHP components are missing to Importer does not check to see if DOM is available

*sigh* Have I ever mentioned how much I hate PHP?

#5 @SergeyBiryukov
11 years ago

  • Milestone changed from Awaiting Review to WordPress.org

#6 @chriscct7
9 years ago

  • Keywords needs-patch added

#7 @pdwalker
8 years ago

Still an issue. Luckily I was able to find this report to resolve the problem.

Note: See TracTickets for help on using tickets.