Last modified: 2014-09-26 01:56:36 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72658, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70658 - Import failed Expected <mediawiki> tag, got
Import failed Expected <mediawiki> tag, got
Status: RESOLVED DUPLICATE of bug 66023
Product: Wikimedia Labs
Classification: Unclassified
deployment-prep (beta) (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
: hhvm, upstream
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-10 15:29 UTC by dan
Modified: 2014-09-26 01:56 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description dan 2014-09-10 15:29:02 UTC
commons beta is having a problem importing some templates from commons; e.g. Template:Artwork, Template:Map.


steps to reproduce
------------------
1. go to http://commons.wikimedia.org/wiki/Special:Export
2. export Template:Map, with all checkbox options checked
3. go to http://commons.wikimedia.beta.wmflabs.org/wiki/Special:Import
4. select the file you just exported
5. click upload file


expected result
---------------
template is imported


actual result
-------------
error message “Import failed: Expected <mediawiki> tag, got”
Comment 1 Jackmcbarn 2014-09-10 15:47:02 UTC
This also happens when doing interwiki imports from en.wikipedia.org to test.wikipedia.org. Note that the export files themselves are fine, as I was able to import them to my own server without error.
Comment 2 Gerrit Notification Bot 2014-09-12 05:56:29 UTC
Change 159973 had a related patch set uploaded by Dan-nl:
Special:Import not importing Special:Export XMLs

https://gerrit.wikimedia.org/r/159973
Comment 3 dan 2014-09-12 06:05:39 UTC
while working on this issue i discovered that when using hhvm, Special:Import cannot open the Special:Export XML file because it never opens the file source. it looks like there may be an issue with the implementation of class UploadSourceAdapter (/core/includes/Import.php) or that hhvm does not allow custom protocols and stream sources.

plan to try and re-implement the UploadSourceAdapter per the hhvm manual’s examples, but not sure if this is the best approach.

http://docs.hhvm.com/manual/en/class.streamwrapper.php
http://docs.hhvm.com/manual/en/stream.streamwrapper.example-1.php
Comment 4 dan 2014-09-12 08:58:00 UTC
re-implemented UploadSourceAdapter trying to follow the manual example class as best as possible, but that didn’t yield any positive results.

with additional testing, it looks like hhvm is not properly supporting custom protocols and streams. in zend’s php, the first method called of a custom stream wrapper is url_stat(). in hhvm, this method is never called.

is the custom stream necessary because the back-end storage of the uploaded file can vary from a file system to mwstore?

i'm not sure how to move further with resolving this issue now. anyone have any ideas?
Comment 5 This, that and the other (TTO) 2014-09-12 09:52:09 UTC

*** This bug has been marked as a duplicate of bug 66023 ***
Comment 6 Gerrit Notification Bot 2014-09-19 21:22:33 UTC
Change 159973 had a related patch set uploaded by Brian Wolff:
Special:Import not importing Special:Export XMLs

https://gerrit.wikimedia.org/r/159973
Comment 7 Andre Klapper 2014-09-19 21:59:40 UTC

*** This bug has been marked as a duplicate of bug 66023 ***
Comment 8 Gerrit Notification Bot 2014-09-26 01:56:36 UTC
Change 159973 abandoned by Dan-nl:
Special:Import not importing Special:Export XMLs

Reason:
since a solution in hhvm was found, as ori mentioned above, i'll abandon this patch. the extracted unit test is available separately in I446f57c1 if you wish to consider adding it.

https://gerrit.wikimedia.org/r/159973

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links