What is the problem?
I have been trying to import articles via the API to https://test.wikipedia.org, but I am seeing this exception:
{ "error": { "code": "internal_api_error_Error", "info": "[291bf630-8e1f-4ace-b6ce-26f19e29cf42] Exception caught: Call to a member function getNamespace() on null", "errorclass": "Error", "trace": "Error at /srv/mediawiki/php-1.43.0-wmf.15/extensions/AutoModerator/src/RevisionCheck.php(297)\nfrom /srv/mediawiki/php-1.43.0-wmf.15/extensions/AutoModerator/src/RevisionCheck.php(297)\n#0 /srv/mediawiki/php-1.43.0-wmf.15/extensions/AutoModerator/src/Hooks/RevisionFromEditCompleteHookHandler.php(122): AutoModerator\\RevisionCheck::revertPreCheck(MediaWiki\\User\\User, MediaWiki\\User\\User, Monolog\\Logger, MediaWiki\\Revision\\RevisionStore, array, MediaWiki\\Permissions\\RestrictionStore, MediaWiki\\Page\\WikiPageFactory, MediaWiki\\User\\UserGroupManager, AutoModerator\\Config\\AutoModeratorWikiConfigLoader, integer, integer)\n#1 /srv/mediawiki/php-1.43.0-wmf.15/extensions/AutoModerator/src/Hooks.php(92): AutoModerator\\Hooks\\RevisionFromEditCompleteHookHandler->handle(WikiPage, MediaWiki\\Revision\\RevisionStoreRecord, integer, MediaWiki\\User\\User, array)\n#2 /srv/mediawiki/php-1.43.0-wmf.15/includes/HookContainer/HookContainer.php(159): AutoModerator\\Hooks->onRevisionFromEditComplete(WikiPage, MediaWiki\\Revision\\RevisionStoreRecord, integer, MediaWiki\\User\\User, array)\n#3 /srv/mediawiki/php-1.43.0-wmf.15/includes/HookContainer/HookRunner.php(3290): MediaWiki\\HookContainer\\HookContainer->run(string, array)\n#4 /srv/mediawiki/php-1.43.0-wmf.15/includes/specials/helpers/ImportReporter.php(175): MediaWiki\\HookContainer\\HookRunner->onRevisionFromEditComplete(WikiPage, MediaWiki\\Revision\\RevisionStoreRecord, integer, MediaWiki\\User\\User, array)\n#5 /srv/mediawiki/php-1.43.0-wmf.15/includes/api/ApiImportReporter.php(59): ImportReporter->reportPage(MediaWiki\\Title\\Title, MediaWiki\\Title\\ForeignTitle, integer, integer, array)\n#6 /srv/mediawiki/php-1.43.0-wmf.15/includes/import/WikiImporter.php(596): ApiImportReporter->reportPage(MediaWiki\\Title\\Title, MediaWiki\\Title\\ForeignTitle, integer, integer, array)\n#7 /srv/mediawiki/php-1.43.0-wmf.15/includes/import/WikiImporter.php(935): WikiImporter->pageOutCallback(MediaWiki\\Title\\Title, MediaWiki\\Title\\ForeignTitle, integer, integer, array)\n#8 /srv/mediawiki/php-1.43.0-wmf.15/includes/import/WikiImporter.php(728): WikiImporter->handlePage()\n#9 /srv/mediawiki/php-1.43.0-wmf.15/includes/api/ApiImport.php(117): WikiImporter->doImport()\n#10 /srv/mediawiki/php-1.43.0-wmf.15/includes/api/ApiMain.php(1953): ApiImport->execute()\n#11 /srv/mediawiki/php-1.43.0-wmf.15/includes/api/ApiMain.php(929): ApiMain->executeAction()\n#12 /srv/mediawiki/php-1.43.0-wmf.15/includes/api/ApiMain.php(900): ApiMain->executeActionWithErrorHandling()\n#13 /srv/mediawiki/php-1.43.0-wmf.15/includes/api/ApiEntryPoint.php(158): ApiMain->execute()\n#14 /srv/mediawiki/php-1.43.0-wmf.15/includes/MediaWikiEntryPoint.php(200): MediaWiki\\Api\\ApiEntryPoint->execute()\n#15 /srv/mediawiki/php-1.43.0-wmf.15/api.php(44): MediaWiki\\MediaWikiEntryPoint->run()\n#16 /srv/mediawiki/w/api.php(3): require(string)\n#17 {main}" }, "servedby": "mw-api-ext.eqiad.main-5874bfb84f-6h5qf" }
Steps to reproduce problem
- https://test.wikipedia.org/wiki/Special:ApiSandbox#action=import&format=json&interwikisource=en&interwikipage=Atlanticus_davisi
- Click "Make request"
Environment
Wiki(s): https://test.wikipedia.org MediaWiki 1.43.0-wmf.15 (b30ac00) 22:23, 22 July 2024. AutoModerator – (047309a) 19:43, 18 July 2024.