Error
MediaWiki version: 1.35.0-wmf.10
Class 'Wikibase\Client\WikibaseClient' not found
Impact
Started with wmf.10, about 0.75 errors/hour
MediaWiki version: 1.35.0-wmf.10
Class 'Wikibase\Client\WikibaseClient' not found
Started with wmf.10, about 0.75 errors/hour
#0 /srv/mediawiki/php-1.35.0-wmf.10/extensions/Math/src/ApiMathWikibaseExtracts.php(24): MathWikibaseConfig::getDefaultMathWikibaseConfig() #1 /srv/mediawiki/php-1.35.0-wmf.10/vendor/wikimedia/object-factory/src/ObjectFactory.php(184): ApiMathWikibaseExtracts->__construct(ApiQuery, string) #2 /srv/mediawiki/php-1.35.0-wmf.10/vendor/wikimedia/object-factory/src/ObjectFactory.php(102): Wikimedia\ObjectFactory::getObjectFromSpec(array, array) #3 /srv/mediawiki/php-1.35.0-wmf.10/includes/api/ApiModuleManager.php(183): Wikimedia\ObjectFactory->createObject(array, array) #4 /srv/mediawiki/php-1.35.0-wmf.10/includes/api/ApiModuleManager.php(155): ApiModuleManager->instantiateModule(string, array) #5 /srv/mediawiki/php-1.35.0-wmf.10/includes/api/ApiBase.php(622): ApiModuleManager->getModule(string) #6 /srv/mediawiki/php-1.35.0-wmf.10/includes/api/ApiBase.php(2418): ApiBase->getModuleFromPath(string) #7 /srv/mediawiki/php-1.35.0-wmf.10/includes/api/ApiParamInfo.php(310): ApiBase->getFinalParamDescription() #8 /srv/mediawiki/php-1.35.0-wmf.10/includes/api/ApiParamInfo.php(130): ApiParamInfo->getModuleInfo(ApiQuery) #9 /srv/mediawiki/php-1.35.0-wmf.10/includes/api/ApiMain.php(1603): ApiParamInfo->execute() #10 /srv/mediawiki/php-1.35.0-wmf.10/includes/api/ApiMain.php(539): ApiMain->executeAction() #11 /srv/mediawiki/php-1.35.0-wmf.10/includes/api/ApiMain.php(510): ApiMain->executeActionWithErrorHandling() #12 /srv/mediawiki/php-1.35.0-wmf.10/api.php(78): ApiMain->execute() #13 /srv/mediawiki/w/api.php(3): require(string) #14 {main}
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/extensions/Math | master | +0 -160 | Delete Math Wikibase API |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | Physikerwelt | T208758 Display popups for annotated <math> tags without touching popups extension code | |||
Resolved | PRODUCTION ERROR | Andreg-p | T240458 Math Extension: Class 'Wikibase\Client\WikibaseClient' not found on wikimania2016.wikimedia.org |
ApiMathWikibaseExtracts
Always does this:
$this->wikibase = new MathWikibaseConnector( MathWikibaseConfig::getDefaultMathWikibaseConfig() );
It shouldn't do that when client is not loaded and this API module should have a nice fallback / not register the api module in this situation.
@Andreg-p just reported that might be caused by the API endpoint. This endpoint is currently not used by the popups extensions. And maybe we should convert it to the new REST API as suggested by @Tgr in https://phabricator.wikimedia.org/T239357#5698243.
@Pchelolo do you know of one can conditionally expose endpoints, or should we just return a 404 if Wikibase is unavailable?
As said in T240458#5732270 the math extension uses or tries to use the WikibaseClient class, event when the wikibase client is not enabled.
Math needs to check if if is running on a wiki with WikibaseClient before trying to use it.
Math should have a fallback for this API is client does not exist, or not register the api module at all.
Change 556700 had a related patch set uploaded (by AndreG-P; owner: AndreG-P):
[mediawiki/extensions/Math@master] Delete Math Wikibase API
That seems the most reasonable thing to do. In a follow up, we can follow the approach I described above.
Change 556700 merged by jenkins-bot:
[mediawiki/extensions/Math@master] Delete Math Wikibase API