Last modified: 2013-07-01 23:42:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T51921, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49921 - imageinfo API returns incorrect data
imageinfo API returns incorrect data
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
master
All All
: High normal (vote)
: ---
Assigned To: Brad Jorsch
:
Depends on:
Blocks: 49896
  Show dependency treegraph
 
Reported: 2013-06-21 00:21 UTC by Inez Korczyński
Modified: 2013-07-01 23:42 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Inez Korczyński 2013-06-21 00:21:53 UTC
In this call http://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&titles=File%3APowderfinger-My_Happiness-23s.ogg&iiprop=size%7Curl&iiurlwidth=200 it returns thumbwidth="1913" thumbheight="-1" as a size of an thumb, which is completly wrong.
Comment 1 Brad Jorsch 2013-06-21 15:38:09 UTC
There are actually two bugs going on here.

First, TimedMediaHandler isn't normalizing dimensions for audio files, which means that the height=-1 being passed to indicate "don't limit by height" is being misinterpreted.

And second, TimedMediaHandler is using an incorrect calculation when the height is the limiting factor on the thumbnail dimensions, leading to the width of 1913. The same happens if you pass something like iiurlwidth=220&iiurlheight=10.

Since both of these are in TimedMediaHandler, I'm going to reassign this there. I'll also submit a patch momentarily.
Comment 2 Gerrit Notification Bot 2013-06-21 15:39:04 UTC
Related URL: https://gerrit.wikimedia.org/r/69869 (Gerrit Change Ide7208394f8495f5b143cbba215d4645598f1a50)
Comment 3 James Forrester 2013-06-30 08:32:18 UTC
(In reply to comment #2)
> Related URL: https://gerrit.wikimedia.org/r/69869 (Gerrit Change
> Ide7208394f8495f5b143cbba215d4645598f1a50)

This has been merged, and went out with wmf9. However, given that wmf8 is on the servers for an extra week and it makes really not-nice behaviour in VisualEditor, we probably want to back-port this.
Comment 4 Gerrit Notification Bot 2013-07-01 19:16:34 UTC
Change 71393 had a related patch set uploaded by Catrope:
Clean up transform dimension height handling

https://gerrit.wikimedia.org/r/71393
Comment 5 Gerrit Notification Bot 2013-07-01 19:16:56 UTC
Change 71393 merged by Catrope:
Clean up transform dimension height handling

https://gerrit.wikimedia.org/r/71393
Comment 6 James Forrester 2013-07-01 23:42:22 UTC
This backport is now live; as such, marking this bug as fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links