Page MenuHomePhabricator

Error: Call to undefined function MediaWiki\Extension\Interwiki\Hooks()
Closed, ResolvedPublic

Description

2021-05-24 20:37:27 test3 test3wiki: [2f41a7458be7e5857e870242] /w/index.php?title=Main_Page&action=edit   Error: Call to undefined function MediaWiki\Extension\Interwiki\Hooks()
#0 /srv/mediawiki/w/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)
#1 /srv/mediawiki/w/includes/HookContainer/HookRunner.php(2256): MediaWiki\HookContainer\HookContainer->run(string, array)
#2 /srv/mediawiki/w/includes/interwiki/ClassicInterwikiLookup.php(282): MediaWiki\HookContainer\HookRunner->onInterwikiLoadPrefix(string, array)
#3 /srv/mediawiki/w/includes/interwiki/ClassicInterwikiLookup.php(163): MediaWiki\Interwiki\ClassicInterwikiLookup->load(string)
#4 /srv/mediawiki/w/includes/interwiki/ClassicInterwikiLookup.php(139): MediaWiki\Interwiki\ClassicInterwikiLookup->fetch(string)
#5 /srv/mediawiki/w/includes/title/MediaWikiTitleCodec.php(400): MediaWiki\Interwiki\ClassicInterwikiLookup->isValidInterwiki(string)
#6 /srv/mediawiki/w/includes/Title.php(3359): MediaWikiTitleCodec->splitTitleString(string, integer)
#7 /srv/mediawiki/w/includes/Title.php(428): Title->secureAndSplit(string, integer)
#8 /srv/mediawiki/w/includes/Title.php(375): Title::newFromTextThrow(string, integer)
#9 /srv/mediawiki/w/includes/skins/Skin.php(1169): Title::newFromText(string)
#10 /srv/mediawiki/w/includes/skins/Skin.php(357): Skin->footerLinkTitle(string, string)
#11 /srv/mediawiki/w/includes/skins/Skin.php(214): Skin->preloadExistence()
#12 /srv/mediawiki/w/includes/skins/SkinTemplate.php(142): Skin->initPage(OutputPage)
#13 /srv/mediawiki/w/includes/OutputPage.php(2634): SkinTemplate->outputPage()
#14 /srv/mediawiki/w/includes/MediaWiki.php(927): OutputPage->output(boolean)
#15 /srv/mediawiki/w/includes/MediaWiki.php(940): MediaWiki::{closure}()
#16 /srv/mediawiki/w/includes/MediaWiki.php(546): MediaWiki->main()
#17 /srv/mediawiki/w/index.php(53): MediaWiki->run()
#18 /srv/mediawiki/w/index.php(46): wfIndexMain()
#19 {main}

Running mediawiki 1.36 and php 7.3.

I discussed this with @Reedy. And I found a fix changing it to "MediaWiki\Extension\Interwiki\Hooks::onInterwikiLoadPrefix'" fixed it.

Change: https://github.com/wikimedia/mediawiki-extensions-Interwiki/commit/b21bafe3858bc97da050280aa5d26ff826ac5611

Event Timeline

Change 693660 had a related patch set uploaded (by Paladox; author: Paladox):

[mediawiki/extensions/Interwiki@master] Revert "Don't register InterwikiLoadPrefix hook unless it is needed"

https://gerrit.wikimedia.org/r/693660

Change 693661 had a related patch set uploaded (by Reedy; author: Paladox):

[mediawiki/extensions/Interwiki@REL1_36] Fix calling "onInterwikiLoadPrefix" hook

https://gerrit.wikimedia.org/r/693661

Change 693661 merged by jenkins-bot:

[mediawiki/extensions/Interwiki@REL1_36] Fix calling "onInterwikiLoadPrefix" hook

https://gerrit.wikimedia.org/r/693661

Change 693660 merged by jenkins-bot:

[mediawiki/extensions/Interwiki@master] Fix calling "onInterwikiLoadPrefix" hook

https://gerrit.wikimedia.org/r/693660

Reedy assigned this task to Paladox.

T283540 filed for the weird hook handling issue