Page MenuHomePhabricator

InstantCommons API requests to Commons are erroring out
Closed, ResolvedPublic

Description

In response for the request https://commons.wikimedia.org/w/api.php?titles=File%3ALambsdorf_Vladimir_%281844-1907%29.jpg&iiprop=url%7Cthumbnail%7Ctimestamp&iiurlwidth=300&iiurlheight=-1&iiurlparam=300px&prop=imageinfo&format=json&action=query&redirects=true&uselang=ru issued by MediaWiki 1.26.2 when trying to get thumbnail of an image hosted with WikiMedia Commons, Wikimedia Commons' API says: {"servedby":"mw1190","warnings":{"imageinfo":{"*":"Unrecognized value for parameter 'iiprop': thumbnail"}},"error":{"code":"iiurlparam","info":"Invalid value for iiurlparam (interlace=)","*":"See https://commons.wikimedia.org/w/api.php for API usage"}}.

As a result, there is a thumbnail creation error.

Event Timeline

alex-mashin raised the priority of this task from to Needs Triage.
alex-mashin updated the task description. (Show Details)
alex-mashin subscribed.

I note there has never been a thumbnail parameter for iiprop.

The Invalid value for iiurlparam (interlace=) is because JpegHandler::parseParamString() is returning "interlace" as false, but JpegHandler::validateParam() is rejecting it. This appears to have been caused by https://gerrit.wikimedia.org/r/#/c/264048/.

matmarex renamed this task from WikiMedia Commons broken (broken backward compability in API?) to InstantCommons API requests to Commons are erroring out.Feb 4 2016, 3:53 PM
matmarex added subscribers: Steinlaus, Nemo_bis.
Aklapper triaged this task as Unbreak Now! priority.Feb 4 2016, 3:55 PM

Change 268404 had a related patch set uploaded (by Bartosz Dziewoński):
BitmapHandler: Implement validateParam()

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

To be honest I don't really understand the code, but fix looks reasonable and fixes the issue locally for me.

Change 268404 merged by Bartosz Dziewoński:
BitmapHandler: Implement validateParam()

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

Change 268407 had a related patch set uploaded (by Bartosz Dziewoński):
BitmapHandler: Implement validateParam()

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

Change 268407 merged by jenkins-bot:
BitmapHandler: Implement validateParam()

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

This has been fixed now, and the fix is deployed to Commons. InstantCommons on my local wiki works again.

I note there has never been a thumbnail parameter for iiprop.

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