Page MenuHomePhabricator

[W4Q1iwpEEj4AAG9APN4AAAAK] /wiki/Albert_Einstein MediaWiki\Services\NoSuchServiceException from line 445 of /srv/mediawiki/php-master/includes/services/ServiceContainer.php: No such service: WikibaseLexemeTermLanguages
Closed, ResolvedPublic

Description

When visiting https://en.m.wikipedia.beta.wmflabs.org/wiki/Albert_Einstein or https://en.wikipedia.beta.wmflabs.org/wiki/Albert_Einstein (mobile or desktop)

I see the following error

[W4Q1rgpEEj4AAGKXd2EAAAAA] /wiki/Albert_Einstein MediaWiki\Services\NoSuchServiceException from line 445 of /srv/mediawiki/php-master/includes/services/ServiceContainer.php: No such service: WikibaseLexemeTermLanguages

Backtrace:

#0 /srv/mediawiki/php-master/includes/services/ServiceContainer.php(408): MediaWiki\Services\ServiceContainer->createService(string)
#1 /srv/mediawiki/php-master/extensions/WikibaseLexeme/src/WikibaseLexemeServices.php(18): MediaWiki\Services\ServiceContainer->getService(string)
#2 /srv/mediawiki/php-master/extensions/WikibaseLexeme/src/WikibaseLexemeHooks.php(141): Wikibase\Lexeme\WikibaseLexemeServices::getTermLanguages()
#3 /srv/mediawiki/php-master/includes/Hooks.php(174): Wikibase\Lexeme\WikibaseLexemeHooks::onWikibaseContentLanguages(array)
#4 /srv/mediawiki/php-master/includes/Hooks.php(234): Hooks::callHook(string, array, array, NULL, string)
#5 /srv/mediawiki/php-master/extensions/Wikibase/lib/includes/WikibaseContentLanguages.php(51): Hooks::runWithoutAbort(string, array)
#6 /srv/mediawiki/php-master/extensions/Wikibase/client/includes/WikibaseClient.php(1236): Wikibase\Lib\WikibaseContentLanguages::getDefaultInstance()
#7 /srv/mediawiki/php-master/extensions/Wikibase/client/includes/WikibaseClient.php(1248): Wikibase\Client\WikibaseClient->getWikibaseContentLanguages()
#8 /srv/mediawiki/php-master/extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php(286): Wikibase\Client\WikibaseClient->getTermsLanguages()
#9 /srv/mediawiki/php-master/extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php(88): Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary->newLanguageIndependentLuaBindings()
#10 /srv/mediawiki/php-master/extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php(487): Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary->getLanguageIndependentLuaBindings()
#11 /srv/mediawiki/php-master/extensions/Scribunto/includes/engines/LuaSandbox/Engine.php(393): Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary->getEntityId(string)
#12 [internal function]: Scribunto_LuaSandboxCallback->__call(string, array)
#13 /srv/mediawiki/php-master/extensions/Scribunto/includes/engines/LuaSandbox/Engine.php(316): LuaSandboxFunction->call(LuaSandboxFunction)
#14 /srv/mediawiki/php-master/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(295): Scribunto_LuaSandboxInterpreter->callFunction(LuaSandboxFunction, LuaSandboxFunction)
#15 /srv/mediawiki/php-master/extensions/Scribunto/includes/engines/LuaCommon/LuaCommon.php(967): Scribunto_LuaEngine->executeFunctionChunk(LuaSandboxFunction, PPTemplateFrame_Hash)
#16 /srv/mediawiki/php-master/extensions/Scribunto/includes/common/Hooks.php(128): Scribunto_LuaModule->invoke(string, PPTemplateFrame_Hash)
#17 /srv/mediawiki/php-master/includes/parser/Parser.php(3478): ScribuntoHooks::invokeHook(Parser, PPTemplateFrame_Hash, array)
#18 /srv/mediawiki/php-master/includes/parser/Parser.php(3185): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#19 /srv/mediawiki/php-master/includes/parser/Preprocessor_Hash.php(1114): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#20 /srv/mediawiki/php-master/includes/parser/Preprocessor_Hash.php(1546): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#21 /srv/mediawiki/php-master/includes/parser/Parser.php(3356): PPTemplateFrame_Hash->cachedExpand(string, PPNode_Hash_Tree)
#22 /srv/mediawiki/php-master/includes/parser/Preprocessor_Hash.php(1114): Parser->braceSubstitution(array, PPFrame_Hash)
#23 /srv/mediawiki/php-master/includes/parser/Parser.php(2999): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#24 /srv/mediawiki/php-master/includes/parser/Parser.php(1345): Parser->replaceVariables(string)
#25 /srv/mediawiki/php-master/includes/parser/Parser.php(474): Parser->internalParse(string)
#26 /srv/mediawiki/php-master/includes/content/WikitextContent.php(341): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#27 /srv/mediawiki/php-master/includes/content/AbstractContent.php(516): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#28 /srv/mediawiki/php-master/includes/poolcounter/PoolWorkArticleView.php(145): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#29 /srv/mediawiki/php-master/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#30 /srv/mediawiki/php-master/includes/page/Article.php(604): PoolCounterWork->execute()
#31 /srv/mediawiki/php-master/includes/actions/ViewAction.php(68): Article->view()
#32 /srv/mediawiki/php-master/includes/MediaWiki.php(501): ViewAction->show()
#33 /srv/mediawiki/php-master/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#34 /srv/mediawiki/php-master/includes/MediaWiki.php(868): MediaWiki->performRequest()
#35 /srv/mediawiki/php-master/includes/MediaWiki.php(525): MediaWiki->main()
#36 /srv/mediawiki/php-master/index.php(42): MediaWiki->run()
#37 /srv/mediawiki/w/index.php(3): include(string)
#38 {main}

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 27 2018, 5:32 PM
Jdlrobson triaged this task as Unbreak Now! priority.Aug 27 2018, 5:33 PM

guessing this classes as unbreak now?

Restricted Application added subscribers: Liuxinyu970226, TerraCodes. · View Herald TranscriptAug 27 2018, 5:33 PM
Restricted Application added a project: Wikidata. · View Herald TranscriptAug 27 2018, 6:48 PM
Addshore added a subscriber: Addshore.
Restricted Application added a project: User-Addshore. · View Herald TranscriptAug 28 2018, 8:02 AM

Apparently WikibaseLexemeHooks::onWikibaseContentLanguages() gets invoked on a client wiki which does not have the service (WikibaseLexemeTermLanguages) registered. Was introducted through https://gerrit.wikimedia.org/r/452712 for T198202

In the Registrar class the following line should be loaded in all situations (repo and client)

$wgServiceWiringFiles[] = __DIR__ . '/../WikibaseLexeme.mediawiki-services.php';

It has accidentally been included below:

		if ( !WikibaseSettings::isRepoEnabled() || !$wgLexemeEnableRepo ) {
			return;
		}

Which means it it will not be loaded on clients

@Addshore that seems right, yes.

OTOH, I got myself caught also by the question whether onWikibaseContentLanguages hook should be called on clients or not. I mean, the hook is fired, but maybe the WikibaseLexeme handler only makes sense on repo side.
Probably it does not only make sense there, so your suggestion is righter.

Addshore added a subscriber: WMDE-leszek.

Change 455776 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseLexeme@master] Load WikibaseLexeme service definitions on repo & client

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

Addshore moved this task from incoming to in progress on the Wikidata board.
Addshore moved this task from incoming to other stuff on the Lexicographical data board.

Change 455776 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Load WikibaseLexeme service definitions on repo & client

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

Addshore closed this task as Resolved.Aug 28 2018, 11:00 AM

Just confirmed that both links on beta now work again

Jdlrobson added a subscriber: nray.Aug 28 2018, 2:56 PM

Thanks all for fixing and thanks @nray for finding the bug!