https://bugzilla.wikimedia.org/show_bug.cgi?id=30975
Web browser: ---
Bug #: 30975
Summary: API import of pages with invalid characters in this
wiki leads to Fatal Error
Product: MediaWiki
Version: 1.17
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: API
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Classification: Unclassified
When using the API to import pages and one of the pages has invalid characters
in the page title, this will result in an Fatal Error, the API also won't
return the result properly then.
Fatal error: Call to a member function getNamespace() on a non-object in
'...\includes\api\ApiQueryBase.php' on line 297
Here the call stack trace:
# Time Memory Function Location
1 0.0006 366264 {main}( ) ..\api.php:0
2 0.2134 15054240 ApiMain->execute( ) ..\api.php:104
3 0.2134 15054272 ApiMain->executeActionWithErrorHandling( )
..\ApiMain.php:323
4 0.2134 15095600 ApiMain->executeAction( ) ..\ApiMain.php:339
5 0.2515 16244760 ApiImport->execute( ) ..\ApiMain.php:657
6 0.2562 16731304 WikiImporter->doImport( ) ..\ApiImport.php:84
7 0.2564 16731448 WikiImporter->handlePage( ) ..\Import.php:370
8 0.2687 17866176 WikiImporter->pageOutCallback( )
..\Import.php:507
9 0.2687 17867064 call_user_func_array ( ) ..\Import.php:246
10 0.2687 17867456 ApiImportReporter->reportPage( )
..\Import.php:246
11 0.2700 18041056 ApiQueryBase::addTitleInfo( )
..\ApiImport.php:177
I would say, this is due to the fact that the Title object was not created,
contained null and was given to the next function anyway.
The special page import doesn't have this error, there, the title is validated
properly.
I guess the problem lays within WikiImporter::handlePage() and/or
WikiImporter::processTitle()
In another run I also got the notices:
Undefined variable: origTitle in WikiImporter::handlePage()
and
Undefined index: _title in WikiImporter::handlePage()
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l