Page MenuHomePhabricator

[Bug] Special:Nearby isn't showing thumbnails on Wikidata
Closed, ResolvedPublic

Description stopped showing thumbnails. We need to investigate and get them back.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 6 2017, 9:56 AM
thiemowmde added subscribers: thiemowmde, Jonas, aude, hoo.

This is what happened, as far as I can see:

  • In November 2016 a heavy breaking change was made to the PageImages extension. Since then it does not use the page_image page property any more by default, but page_image_free.
  • T124225: PageImages should never return non-free images was the motivation for the braking change, but it was not this ticket where the actual change was made.
  • The actual braking change was made later in, tracked in T131105: Pageimages should return both free and non-free images with 'free-ness' denoted as a property.
  • The old behavior can be restored by adding pilicense=any to the PageImages API request.
  • Special:Nearby can not use this parameter. It purposely depends on the page_image_free property since then and ignores the page_image property completely. This was the whole motivation for the change.
  • The only dependency between Wikibase and the PageImages extension is the fact that Wikibase also sets the page_image property, without depending on any PageImages code. We assumed PageImages will find and use the page property. This assumption now broke.

This means we must teach Wikibase if an image is free or not. We can do this by copying a few lines of code from the PageImages extension (most notably LinksUpdateHookHandler::isImageFree) and then set page_image_free instead of the now dysfunctional page_image if an image is considered "free". (Note: Never set both properties.) Or we must refactor the PageImages code in a way we can use it as a service.

thiemowmde moved this task from incoming to ready to go on the Wikidata board.Mar 6 2017, 10:30 AM

Your best bet would be to set the default license to any for Wikidata which can be achieved once T156190 is complete. There's no reason Special:Nearby on Wikidata should have to use free images and no reason it should be forced to be made aware of them. Does that sound like a plan?

That seems sensible to me.

@Jdlrobson, that would be super awesome. Thanks!

Viveksr96 claimed this task.Mar 8 2017, 3:00 PM
Viveksr96 added a subscriber: Viveksr96.

I want to give a try on this issue.

@Viveksr96 go for it ! You'll need to work and comment on T156190 however... not this task.

Change 354713 had a related patch set uploaded (by Aude; owner: Aude):
[mediawiki/extensions/Wikibase@master] Use PageImages::PROP_NAME_FREE page prop for commons media values

We need to update configuration like so for this problem to be fixed:

'wgPageImagesAPIDefaultLicense' => [
'default': 'free',
'wikidatawiki': 'any'
aude added a project: User-aude.
aude moved this task from Backlog to Doing on the User-aude board.

Change 354713 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use PageImages::PROP_NAME_FREE page prop for commons media values

Change 356171 had a related patch set uploaded (by Aude; owner: Aude):
[operations/mediawiki-config@master] Set wgPageImagesAPIDefaultLicense to 'any' for wikidata

Change 356171 merged by jenkins-bot:
[operations/mediawiki-config@master] Set wgPageImagesAPIDefaultLicense to 'any' for wikidata

aude closed this task as Resolved.May 30 2017, 1:50 PM
aude claimed this task.
aude removed a project: Patch-For-Review.
aude moved this task from Doing to Done on the User-aude board.