Hello,
I am new to this list and have a question about importing XML dumps from Wikipedia (http://dumps.wikimedia.org/enwiki/20121101/) into an offline MediaWiki database. I have locally installed XAMPP on Windows 8 and replaced the included 32-bit MySQL version with the latest 64-bit version. I then installed MediaWiki 1.20.0 with an empty database.
When trying to import an XML dump (Nov 2011 dump) with importDump.php in the maintenance folder of the MediaWiki installation, I get the following error after about 2 seconds:
"WikiRevision given a null title in import. You may need to adjust $wgLegalTitleChars." which is thrown at line 1032 in Import.php, because some $title seems to be null. Replacing the exception with "$this->title = null" (evil ^^) leads to other errors.
xml2sql and mwdumper seem to be outdated as I cannot get them working with the current dumps. Special:Import is not an option due to the size of the XML files.
Any help would be appreciated :)
P.S. it's not the missing + in $wgLegalTitleChars that is missing which is suggested by a Google Search on that error
Best Regards
Chris
On 17/11/12 02:05, Christoph Sackl wrote:
When trying to import an XML dump (Nov 2011 dump) with importDump.php in the maintenance folder of the MediaWiki installation, I get the following error after about 2 seconds:
“WikiRevision given a null title in import. You may need to adjust $wgLegalTitleChars.” which is thrown at line 1032 in Import.php, because some $title seems to be null. Replacing the exception with “$this->title = null” (evil ^^) leads to other errors.
Trying to work with a null title won't work at all. It seems supposed to skip pages for which it could not get a Title, though (which is not happening).
We need to know what title you are having problems with.
At includes/Import.php you will find the following around line 584:
if ( !$title ) { $badTitle = true; $skip = true; }
Can you pleas add var_dump($pageInfo['title']); after the $badTitle = true; line?
That should print the problematic title just before the exception is being thrown.
Depending on the nature of the title, it may indeed be a $wgLegalTitleChars problem, or something different.
Regards
xmldatadumps-l@lists.wikimedia.org