Page MenuHomePhabricator

Import from en.wp failed: Expected <mediawiki> tag, got
Closed, DuplicatePublic

Description

I cannot import pages into my local wiki.

Go to Special:Export
Try to export Talk:The_Girl_with_the_Dragon_Tattoo
Success
Then go to Special:Import on local wiki
Try to import.
Get error: Import failed: Expected <mediawiki> tag, got


Version: unspecified
Severity: normal

Details

Reference
bz70781

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:57 AM
bzimport set Reference to bz70781.
bzimport added a subscriber: Unknown Object (MLST).

I assume that page is https://en.wikipedia.org/wiki/Talk:The_Girl_with_the_Dragon_Tattoo

As you wrote "pages" (plural), does that imply this a general problem and you ran into this also somewhere else? Or only with talk pages? Or only this page?

I haven't investigated too much but I've hit it on every page I've tried to import. Seems to be a general issue.

Have you tried making sure the server can access the file it is trying to download?

Or are you on HHVM? (see bug 66023)

But yeah, we need a better error message for this. I think https://gerrit.wikimedia.org/r/159973 is supposed to address this aspect.

I think this might be an issue with vagrant... Baha reported the same issue.

(In reply to This, that and the other (TTO) from comment #3)

Have you tried making sure the server can access the file it is trying to
download?

Or are you on HHVM? (see bug 66023)

(In reply to Jon from comment #4)

I think this might be an issue with vagrant... Baha reported the same issue.

This sounds exactly like bug 66023. HHVM had an issue with XMLReader::open() and stream wrappers that caused parsing the import XML to fail. This bug has been fixed upstream and WMF's HHVM builds updated to include the fix. For MediaWiki-Vagrant users, the following steps should resolve the issue in their local VM:

$ cd vagrant
$ git pull
$ vagrant provision

The latest hhvm package from WMF's apt repo at the time of this posting is 3.3.0-20140925+wmf2 and it needs configuration changes that were introduced to mediawiki-vagrant's puppet code in I17173cc461f667e146bf8c8ed2a8bc2b21c6045e

If the dump is sufficiently large there may still be timeout issues associated with importing it via the web UI. In that case (and actually in all import cases) I would recommend using the importDump.php maintenance script to load the dump. MediaWiki-Vagrant even provides a handy command (vagrant import-dump) to make running this particular script from the host computer easy.

I updated vagrant but still hitting issues...

vagrant@mediawiki-vagrant:/vagrant/mediawiki$ php maintenance/importDump.php dump.xml
Segmentation fault (core dumped)
vagrant@mediawiki-vagrant:/vagrant/mediawiki$ php maintenance/importDump.php dump2.xml
Segmentation fault (core dumped)