Error
MediaWiki version: 1.35.0-wmf.34
Local entity source does not have items.
Impact
Production fatal errors.
Train blocker
MediaWiki version: 1.35.0-wmf.34
Local entity source does not have items.
Production fatal errors.
Train blocker
#0 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Wikibase/repo/includes/WikibaseRepo.php(1831): Wikibase\Lib\Store\Sql\Terms\TermStoreWriterFactory->newItemTermStoreWriter() #1 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Wikibase/repo/includes/WikibaseRepo.php(1789): Wikibase\Repo\WikibaseRepo->getItemTermStoreWriters() #2 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Wikibase/repo/WikibaseRepo.entitytypes.php(85): Wikibase\Repo\WikibaseRepo->newItemHandler() #3 [internal function]: Wikibase\Repo\WikibaseRepo::{closure}() #4 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Wikibase/repo/includes/Content/EntityContentFactory.php(297): call_user_func(Closure) #5 /srv/mediawiki/php-1.35.0-wmf.34/extensions/Wikibase/repo/RepoHooks.php(135): Wikibase\Repo\Content\EntityContentFactory->getContentHandlerForType(string) #6 /srv/mediawiki/php-1.35.0-wmf.34/vendor/wikimedia/object-factory/src/ObjectFactory.php(172): Wikibase\RepoHooks::Wikibase\{closure}(string) #7 /srv/mediawiki/php-1.35.0-wmf.34/vendor/wikimedia/object-factory/src/ObjectFactory.php(102): Wikimedia\ObjectFactory::getObjectFromSpec(array, array) #8 /srv/mediawiki/php-1.35.0-wmf.34/includes/content/ContentHandlerFactory.php(222): Wikimedia\ObjectFactory->createObject(Closure, array) #9 /srv/mediawiki/php-1.35.0-wmf.34/includes/content/ContentHandlerFactory.php(170): MediaWiki\Content\ContentHandlerFactory->createContentHandlerFromHandlerSpec(string, Closure) #10 /srv/mediawiki/php-1.35.0-wmf.34/includes/content/ContentHandlerFactory.php(82): MediaWiki\Content\ContentHandlerFactory->createForModelID(string) #11 /srv/mediawiki/php-1.35.0-wmf.34/includes/content/ContentHandlerFactory.php(140): MediaWiki\Content\ContentHandlerFactory->getContentHandler(string) #12 /srv/mediawiki/php-1.35.0-wmf.34/includes/api/ApiEditPage.php(616): MediaWiki\Content\ContentHandlerFactory->getAllContentFormats() #13 /srv/mediawiki/php-1.35.0-wmf.34/includes/api/ApiBase.php(1700): ApiEditPage->getAllowedParams(integer) #14 /srv/mediawiki/php-1.35.0-wmf.34/includes/api/ApiBase.php(673): ApiBase->getFinalParams() #15 /srv/mediawiki/php-1.35.0-wmf.34/includes/api/ApiMain.php(1178): ApiBase->extractRequestParams() #16 /srv/mediawiki/php-1.35.0-wmf.34/includes/api/ApiMain.php(1562): ApiMain->setupModule() #17 /srv/mediawiki/php-1.35.0-wmf.34/includes/api/ApiMain.php(523): ApiMain->executeAction() #18 /srv/mediawiki/php-1.35.0-wmf.34/includes/api/ApiMain.php(494): ApiMain->executeActionWithErrorHandling() #19 /srv/mediawiki/php-1.35.0-wmf.34/api.php(84): ApiMain->execute() #20 /srv/mediawiki/w/api.php(3): require(string) #21 {main}
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | ovasileva | T252800 Regression: Option add links in other languages has disappeared | |||
Resolved | Release | • mmodell | T253022 1.35.0-wmf.34 deployment blockers | ||
Resolved | PRODUCTION ERROR | Addshore | T253804 Exception from TermStoreWriterFactory : Local entity source does not have items. | ||
Duplicate | zeljkofilipin | T253049 selenium-daily-betacommons-MediaWiki fails with `internal_api_error_LogicException: [...] Exception caught: Local entity source does not have items.` |
So, Commons needs to be able to create an ItemHandler object in order to be able to do things with Items.
An ItemHandler currently needs a ItemTermStoreWriter, as ContentHandler is also what does writes and secondary data updates in getSecondaryDataUpdates
The patch above introduced a check making sure that these writers would only be created when the local entity source / local wiki has access to Items for writing, hence the exception.
We could do one of the following:
Will continue on this in the morning
The ideal solution would be that the ItemHandler, or the thing only needing access to read data, shouldn't need services that are only used for writing.
But the Handlers are used for both right now and I believe that would need fixes in core.
Change 599352 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Use ThrowingEntityTermStoreWriter when writers shouldn't be called
Change 599364 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@wmf/1.35.0-wmf.34] Use ThrowingEntityTermStoreWriter when writers shouldn't be called
Change 599364 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@wmf/1.35.0-wmf.34] Use ThrowingEntityTermStoreWriter when writers shouldn't be called
Mentioned in SAL (#wikimedia-operations) [2020-05-28T16:32:58Z] <jforrester@deploy1001> Synchronized php-1.35.0-wmf.34/extensions/Wikibase: T253804 Use ThrowingEntityTermStoreWriter when writers shouldn't be called (duration: 01m 15s)
Deployed and confirmed fixed on the test URL https://test-commons.wikimedia.org/w/api.php?action=help&recursivesubmodules=1
Change 599352 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use ThrowingEntityTermStoreWriter when writers shouldn't be called