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