Make PageImages default API license parameter configurable
Open, NormalPublic1 Story Points

Description

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.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 24 2017, 9:42 PM
Jdlrobson triaged this task as "Normal" priority.Jan 25 2017, 7:43 PM
Jdlrobson added a project: Easy.
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptJan 25 2017, 7:43 PM
ovasileva set the point value for this task to 1.Jan 25 2017, 7:43 PM
Jdlrobson added a subscriber: Jdlrobson.

This would help WIkidata a lot which we broke. See T159678.

Jdlrobson raised the priority of this task from "Normal" 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 "Normal".

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.