Good Day

I try import from file

But i have error message "The uploaded file is not a valid WordPress export"

But, i import from this file to wordpress.com, its imported correctly

Comments

Valeratal’s picture

Status: Postponed (maintainer needs more info) » Active

Module "WordPress Migrate" need
and

But why?

mikeryan’s picture

Status: Active » Postponed (maintainer needs more info)

Is there any more information you can give? There's not much here to go on...

Valeratal’s picture

Status: Active » Postponed (maintainer needs more info)

Sorry, tags not showed

Module WordPress Migrate need "link" and "wp:base_blog_url"

cafuego’s picture

Status: Postponed (maintainer needs more info) » Needs review

I've had this problem (with an export file that was not from wordpress.com) and the problem turned out to be two empty lines that wordpress puts at the top of the exported XML file. These cause the file to fail validation and the export to never run.

I found the problem after running xmllint as suggested by http://atendesigngroup.com/blog/painlessly-migrate-wordpress-drupal

It might be nice to add a reference to xmllint in the docs of this module, as the libxml errors are, as far as I can tell, generally less than helpful.

mikeryan’s picture

Status: Needs review » Postponed (maintainer needs more info)

@Valeratel: Sorry, didn't review your response because the issue status was postponed, when responding be sure to set the issue status to "active" if you want it reviewed. Not to "needs review", which is used when submitting patches.

The wordpress_migrate module uses the link and base_blog_url values to identify the source blog, both to internally distinguish it from others (some people will import multiple WordPress blogs into one Drupal installation) and to display in the UI so you know which blog you're importing. These should always be present in any exported WordPress file, are they not present in yours?

@cafuego: We should be able to easily have wordpress_migrate strip empty lines from the beginning of the file.

cafuego’s picture

We should be able to easily have wordpress_migrate strip empty lines from the beginning of the file.

Yay :-)

mikeryan’s picture

Title: The uploaded file is not a valid WordPress export but wordpress.com import correctly » Empty lines at beginning of file prevent import
Assigned: Valeratal » mikeryan
Category: support » bug
Status: Postponed (maintainer needs more info) » Active
mikeryan’s picture

Status: Active » Fixed

OK, finally got around to doing this, empty lines at the beginning now discarded.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.