Author: mediawiki-bugzilla
Description:
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.
Version: 1.15.x
Severity: normal
URL: http://www.mediawiki.org/wiki/Manual_talk:Importing_XML_dumps#Error_Importing_XML_Files