Page MenuHomePhabricator

Make PageImages default API license parameter configurable
Closed, ResolvedPublic1 Estimated Story Points

Description

If this is configurable Wikidata will be able to show page images on search results, nearby and inside page previews when enabled.

This is the result of the comments from: https://gerrit.wikimedia.org/r/#/c/333094/1/includes/ApiQueryPageImages.php

Benefits:

Pmiazga
Two reasons:
a) we already had to change it once, if it changes again we're covered. I'm a fan of making everything configurable.
b) just came to my mind that on 3rd party wiki instances admins might don't care is it free or any.

Event Timeline

Jdlrobson triaged this task as Medium priority.Jan 25 2017, 7:43 PM
Jdlrobson added a project: good first task.
ovasileva set the point value for this task to 1.Jan 25 2017, 7:43 PM
Jdlrobson raised the priority of this task from Medium to High.Mar 7 2017, 4:58 PM
Jdlrobson added a subscriber: ovasileva.

@ovasileva I'm suggesting we rethink this as high given the Wikidata breakage. Feel free to bump back down with reasoning if necessary.

@thiemowmde looks like we don't have bandwidth to work on this, during this sprint but I have code review bandwidth and can commit to testing/merging if one of you is able to tackle the problem.

I don't know how we would do that without undoing the breaking change. Which might be what I'm going to suggest anyway, because from my perspective it does not make much sense to make the PageImages extensions hard-code a "free images only" default that encodes knowledge about Wikimedia Commons, but does not apply to other users of the same extension (with one of these users being Wikidata). From what I understood this should have been made a configuration that is set to "free" on the relevant wikis only, but defaults to "all".

We clearly should not change the code we have in Wikibase to store stuff in the page_image_free page property, because we can not guarantee the images that are linked in Wikidata items can really be considered "free".

I do not want to duplicate the PageImage code that decides if an image is free or not. To be honest I do not even want to use it, because it appears to be fragile, depending on external knowledge about "metadata" that comes from somewhere else.

Lets see if we are going to pick T159678 up in our #wikidata-sprint soon.

@thiemowmde it shouldn't need to be a breaking change just flagging this part of the code.
Suggested action would be to feature flag free image usage e.g. wgPageImagesEnforceFree that's true by default and forces the system to store to and retrieve page images from page_image.

It would be true on Wikipedia.org and false on Wikidata.org where as you point out it doesn't make sense.
Am I missing something ?

This sounds like a very nice idea. Tanks a lot, @Jdlrobson, I will definitely look into this when we pick this up!

Jdlrobson lowered the priority of this task from High to Medium.Apr 20 2017, 11:05 PM
Jdlrobson added a project: patch-welcome.

I'm guessing this is not as high priority as we originally thought, but also if anyone has bandwidth to send a patch I will happily review.

Change 354705 had a related patch set uploaded (by Aude; owner: Aude):
[mediawiki/extensions/PageImages@master] Make PageImages default API license parameter configurable

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

Change 354705 merged by jenkins-bot:
[mediawiki/extensions/PageImages@master] Make PageImages default API license parameter configurable

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

aude moved this task from Review to Done on the User-aude board.
aude removed a project: Patch-For-Review.

we still need to make a config change for Wikidata sometime this week for this to take effect