Page MenuHomePhabricator

Deleting a page listed on Special:DisambiguationPageLinks when $wgMiserMode = true results in DisambiguationPageLinks giving an internal error
Closed, InvalidPublicBUG REPORT


If a wiki has the setting $wgMiserMode = true, and a page listed on Special:DisambiguationPageLinks is deleted, and Special:DisambiguationPageLinks is visited before the maintenance script updateSpecialPages.php is run, an internal error is produced. Undeleting the page causes the special page to display correctly. Example stacktrace:

[513a7ecf70e9989495056a80] /wiki/Special:DisambiguationPageLinks TypeError from line 281 of /var/www/REL1_31/includes/linker/LinkRenderer.php: Argument 1 passed to MediaWiki\Linker\LinkRenderer::makeKnownLink() must implement interface MediaWiki\Linker\LinkTarget, null given, called in /var/www/REL1_31/extensions/Disambiguator/specials/SpecialDisambiguationPageLinks.php on line 76


#0 /var/www/REL1_31/extensions/Disambiguator/specials/SpecialDisambiguationPageLinks.php(76): MediaWiki\Linker\LinkRenderer->makeKnownLink(NULL)
#1 /var/www/REL1_31/includes/specialpage/QueryPage.php(705): SpecialDisambiguationPageLinks->formatResult(SkinVector, stdClass)
#2 /var/www/REL1_31/includes/specialpage/QueryPage.php(671): QueryPage->outputResults(OutputPage, SkinVector, Wikimedia\Rdbms\DatabaseMysqli, Wikimedia\Rdbms\ResultWrapper, integer, integer)
#3 /var/www/REL1_31/includes/specialpage/SpecialPage.php(522): QueryPage->execute(NULL)
#4 /var/www/REL1_31/includes/specialpage/SpecialPageFactory.php(568): SpecialPage->run(NULL)
#5 /var/www/REL1_31/includes/MediaWiki.php(288): SpecialPageFactory::executePath(Title, RequestContext)
#6 /var/www/REL1_31/includes/MediaWiki.php(861): MediaWiki->performRequest()
#7 /var/www/REL1_31/includes/MediaWiki.php(524): MediaWiki->main()
#8 /var/www/REL1_31/index.php(42): MediaWiki->run()
#9 {main}

I'm aware that MediaWiki 1.31 is now EOL, but I can't currently test this in any newer version of MediaWiki to see if it happens there; if it doesn't, feel free to close this as invalid or whatever (I also wasn't able to find any tasks, open or closed, for this issue).

Event Timeline

The old code[1] is using Title::newFromID with the pageid, after deletion the pageid is not found and Title::newFromID returns null, which gives the fatal from LinkRenderer

That was changed in [2], but not with a reference to that problem. But the new code seems to avoid fatals with deleted pages. It is part of REL1_35


Umherirrender triaged this task as Lowest priority.