Page MenuHomePhabricator

Imageinfo queries to non-Commons wikis about Commons files return incomplete extmetadata
Closed, ResolvedPublicBUG REPORT

Description

This is affecting our /page/media results

Steps to Reproduce:

for File:Female_Anna's_Hummingbird.JPG:
https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&iiextmetadatamultilang=&titles=File:Female_Anna%27s_Hummingbird.JPG

Actual Results:

Only a small subset of extmetadata fields (DateTime, ObjectName, CommonsMetadataExtension, Categories, Assessments) are returned.

Important fields like License and ImageDescription are missing.

Expected Results:

All extmetadata is returned.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 509398 had a related patch set uploaded (by Mholloway; owner: Michael Holloway):
[mediawiki/services/mobileapps@master] Revert "Revert "Bifurcate imageinfo queries to improve performance""

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

Mholloway renamed this task from Imageinfo queries to non-Commons wikis return incomplete extmetadata to Imageinfo queries to non-Commons wikis return incomplete extmetadata when iiextmetadatamultilang=true.May 10 2019, 1:55 PM
Mholloway renamed this task from Imageinfo queries to non-Commons wikis return incomplete extmetadata when iiextmetadatamultilang=true to Imageinfo queries to non-Commons wikis return incomplete extmetadata for some files when iiextmetadatamultilang=true.May 10 2019, 2:01 PM
Mholloway updated the task description. (Show Details)

I don't see the Commons description of either File:Female_Anna's_Hummingbird.JPG or File:Trinidad_and_Tobago_hummingbirds_composite.jpg show up on their enwiki page, which is a (possibly unrelated) bug in itself.

Could this possibly be related to the implementation of the new Commons description/Wikidata template?

I don't see the Commons description of either File:Female_Anna's_Hummingbird.JPG or File:Trinidad_and_Tobago_hummingbirds_composite.jpg show up on their enwiki page, which is a (possibly unrelated) bug in itself.

That's T222935: HttpRequestFactory get method always return null (was: All local file description pages pointing to Commons do not display description locally from 1.34.0-wmf.4), apparently.

CommonsMetadata parses the local description page so it would make sense for that to be the cause, but then it should expect all the files. Maybe it's just a caching issue and it will eventually...

Indeed caused by T222935, but the wrong results are still cached. A purge (on Commons) fixes it.
The cache expires only after 30 days, so we should probably do something about it.

Change 509398 abandoned by Mholloway:
Revert "Revert "Bifurcate imageinfo queries to improve performance""

Reason:
Underlying issue (T222935) is fixed, so there's no need anymore to revive this as a band-aid.

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

Change 509869 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/extensions/CommonsMetadata@master] Add ability for manual cache resets

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

Tgr renamed this task from Imageinfo queries to non-Commons wikis return incomplete extmetadata for some files when iiextmetadatamultilang=true to Imageinfo queries to non-Commons wikis about Commons files return incomplete extmetadata.May 13 2019, 4:18 PM

Passing this to @Tgr for the cache busting piece.

(FWIW iiextmetadatamultilang=true is only relevant in that it acted as a cache breaker.)

Change 509905 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[operations/mediawiki-config@master] Invalidate CommonsMetadata cache for entries affected by T222935

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

Change 509869 abandoned by Gergő Tisza:
Add ability for manual cache resets

Reason:
Abandoning in favor of using the hook directly (see I1fa3407a2 for current issue)

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

Change 509905 merged by jenkins-bot:
[operations/mediawiki-config@master] Invalidate CommonsMetadata cache for entries affected by T222935

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

Mentioned in SAL (#wikimedia-operations) [2019-05-13T18:25:44Z] <reedy@deploy1001> Synchronized wmf-config/CommonSettings.php: T222954 (duration: 00m 49s)