Last modified: 2014-09-26 01:56:36 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”
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.
Change 159973 had a related patch set uploaded by Dan-nl: Special:Import not importing Special:Export XMLs https://gerrit.wikimedia.org/r/159973
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
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?
*** This bug has been marked as a duplicate of bug 66023 ***
Change 159973 had a related patch set uploaded by Brian Wolff: Special:Import not importing Special:Export XMLs https://gerrit.wikimedia.org/r/159973
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