Last modified: 2011-08-03 19:42:34 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.
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.
*** Bug 23055 has been marked as a duplicate of this bug. ***