Page MenuHomePhabricator

TermLookupException (Term type 'alias' is not supported) when getting pageterms of files with structured data
Closed, ResolvedPublicPRODUCTION ERROR

Description

Error

MediaWiki version: 1.35.0-wmf.15

message
Term type 'alias' is not supported
exception.trace
#0 /srv/mediawiki/php-1.35.0-wmf.15/extensions/WikibaseMediaInfo/src/Services/MediaInfoPrefetchingTermLookup.php(108): Wikibase\MediaInfo\Services\MediaInfoPrefetchingTermLookup->prefetchTerm(Wikibase\MediaInfo\DataModel\MediaInfoId, array, array)
#1 /srv/mediawiki/php-1.35.0-wmf.15/extensions/Wikibase/data-access/src/ByTypeDispatchingPrefetchingTermLookup.php(52): Wikibase\MediaInfo\Services\MediaInfoPrefetchingTermLookup->prefetchTerms(array, array, array)
#2 /srv/mediawiki/php-1.35.0-wmf.15/extensions/Wikibase/data-access/src/ByTypeDispatchingPrefetchingTermLookup.php(52): Wikibase\DataAccess\ByTypeDispatchingPrefetchingTermLookup->prefetchTerms(array, array, array)
#3 /srv/mediawiki/php-1.35.0-wmf.15/extensions/Wikibase/client/includes/Api/PageTerms.php(91): Wikibase\DataAccess\ByTypeDispatchingPrefetchingTermLookup->prefetchTerms(array, array, array)
#4 /srv/mediawiki/php-1.35.0-wmf.15/extensions/Wikibase/client/includes/Api/PageTerms.php(76): Wikibase\Client\Api\PageTerms->getTermsOfEntities(array, array, string)
#5 /srv/mediawiki/php-1.35.0-wmf.15/includes/api/ApiQuery.php(255): Wikibase\Client\Api\PageTerms->execute()
#6 /srv/mediawiki/php-1.35.0-wmf.15/includes/api/ApiMain.php(1603): ApiQuery->execute()
#7 /srv/mediawiki/php-1.35.0-wmf.15/includes/api/ApiMain.php(539): ApiMain->executeAction()
#8 /srv/mediawiki/php-1.35.0-wmf.15/includes/api/ApiMain.php(510): ApiMain->executeActionWithErrorHandling()
#9 /srv/mediawiki/php-1.35.0-wmf.15/api.php(78): ApiMain->execute()
#10 /srv/mediawiki/w/api.php(3): require(string)
#11 {main}

Impact

Minimal. Three occurrences in logstash over the last 30 days, one of them from me to test this. First seen 2020-01-16, not long after all wikis to wmf.15.

Notes

Workaround for API users: specify wbptterms=label|description (i. e. exclude aliases) or just wbptterms=label (as descriptions aren’t meaningful anyways, though reportedly some do exist).

Does not affect files without structured data (exampleFile:Wikidata-logo-en.svg has no structured data yet).

Details

Request ID
XiX6mwpAAEwAAALX6SoAAAAV
Request URL
https://commons.wikimedia.org/w/api.php?action=query&format=json&prop=pageterms&titles=File%3AWikidataCon%202019%20logo.svg

Event Timeline

Lucas_Werkmeister_WMDE renamed this task from Term type 'alias' is not supported to TermLookupException (Term type 'alias' is not supported) when getting pageterms of files with structured data.Jan 20 2020, 7:19 PM
Lucas_Werkmeister_WMDE updated the task description. (Show Details)
Krinkle added subscribers: Cparle, Krinkle.

@Cparle Not sure which tag to add, is this the right one?

Btw, if you want help configuring Phab to automatically bring WikibaseMediaInfo tasks into your process, let me know :)

It's the one I always use :) I think we have some herald rules set up for some tags, but I'm not sure exactly which ones ... might ask you about it at all-hands

Change 577544 had a related patch set uploaded (by Cparle; owner: Cparle):
[mediawiki/extensions/WikibaseMediaInfo@master] Fail gracefully instead of throwing if unsupported term type requested

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

Change 577544 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Fail gracefully instead of throwing if unsupported term type requested

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

@Krinkle hopefully this is fixed now, will wait to close until you verify the error is gone (once the train rolls)

@Cparle Thanks, fix looks nice. No need to wait for me though. Kibana can be tad stubborn at times, and I'm happy to help, so feel free to message me on IRC for a chat or quick Hangouts call if you need anything. In general though it's okay to close without my involvement.

Oops, didn't mean to close ... will check on kibana a few times over the next few weeks and see what's what

Last occurrence on March 9th, so closing