Last modified: 2011-08-03 19:42:34 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 21000 - Import errors on <restrictions> elements
Import errors on <restrictions> elements
Status: NEW
Product: MediaWiki
Classification: Unclassified
Export/Import (Other open bugs)
1.15.x
All All
: Normal normal (vote)
: ---
Assigned To: Ariel T. Glenn
http://www.mediawiki.org/wiki/Manual_...
:
: 23055 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-05 10:21 UTC by Karsten Hiddemann
Modified: 2011-08-03 19:42 UTC (History)
2 users (show)

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


Attachments

Description Karsten Hiddemann 2009-10-05 10:21:09 UTC
Protected redirects, i.e. articles that contain <redirect /> and <restrictions></restrictions> elements in a dump, cause imports to fail. See the following from the Manual talk page:

---

    I am using 1.15. , and I get the following errors:

    <b>Warning</b>: xml_parse() [<a href='function.xml-parse'>function.xml-parse</a>]: Unable to call handler in_() in <b>/home/content/s/h/s/shscentral/html/w/includes/Import.php</b> on line <b>437</b><br />
    <br />
    <b>Warning</b>: xml_parse() [<a href='function.xml-parse'>function.xml-parse</a>]: Unable to call handler out_() in <b>/home/content/s/h/s/shscentral/html/w/includes/Import.php</b> on line <b>437</b><br />

    By analyzing what entries kill the script, I found that it is protected redirects- these errors come when a page has both <redirect /> and the <restrictions></restrictions> lines. Manually removing the restrictions line makes it work. I get these errors both from importdump.php and in my browser window on special:import when there is a protected redirect in the file. 76.244.158.243 02:55, 30 September 2009 (UTC) 

---

I have encountered the same problem. Here are the error messages:

---

Warning: xml_parse(): Unable to call handler in_() in /usr/share/mediawiki/includes/Import.php on line 437

Call Stack:
    0.0023     100896   1. {main}() /usr/share/mediawiki/maintenance/importDump.php:0
    0.3745    7977572   2. BackupReader->importFromFile() /usr/share/mediawiki/maintenance/importDump.php:171
    0.3747    7978016   3. BackupReader->importFromHandle() /usr/share/mediawiki/maintenance/importDump.php:122
    0.3898    8322900   4. WikiImporter->doImport() /usr/share/mediawiki/maintenance/importDump.php:145
    0.3903    8364800   5. xml_parse() /usr/share/mediawiki/includes/Import.php:437


Warning: xml_parse(): Unable to call handler out_() in /usr/share/mediawiki/includes/Import.php on line 437

Call Stack:
    0.0023     100896   1. {main}() /usr/share/mediawiki/maintenance/importDump.php:0
    0.3745    7977572   2. BackupReader->importFromFile() /usr/share/mediawiki/maintenance/importDump.php:171
    0.3747    7978016   3. BackupReader->importFromHandle() /usr/share/mediawiki/maintenance/importDump.php:122
    0.3898    8322900   4. WikiImporter->doImport() /usr/share/mediawiki/maintenance/importDump.php:145
    0.3903    8364800   5. xml_parse() /usr/share/mediawiki/includes/Import.php:437

---

Removing the <restrictions></restrictions> elements from the XML dump makes the import process work again.
Comment 1 Brion Vibber 2009-10-05 16:14:09 UTC
Tomasz -- looks like we need to make sure that MediaWiki's import processor (used for Special:Import and importDump.php) is friendly to the new elements we're starting to add in. ISTR the original arch I made for it wasn't very forgiving to unrecognized elements, which kinda sucks.

We might need/want to backport a fix to 1.15 if 1.16's gonna be a while.
Comment 2 Chad H. 2010-04-05 18:48:34 UTC
*** Bug 23055 has been marked as a duplicate of this bug. ***

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


Navigation
Links