Page MenuHomePhabricator

TermLookupException (Term type 'alias' is not supported) when getting pageterms of files with structured data
Open, Needs TriagePublic

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

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 20 2020, 7:15 PM
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 :)

Restricted Application added a project: Structured-Data-Backlog. · View Herald TranscriptJan 23 2020, 11:41 AM

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

Krinkle updated the task description. (Show Details)Jan 29 2020, 12:21 AM
Krinkle edited Stack Trace. (Show Details)