Last modified: 2012-05-25 14:26:13 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 T39021, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37021 - Wrong imageinfo reported
Wrong imageinfo reported
Status: RESOLVED DUPLICATE of bug 36839
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.20.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-22 14:48 UTC by Volker Haas
Modified: 2012-05-25 14:26 UTC (History)
6 users (show)

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


Attachments

Description Volker Haas 2012-05-22 14:48:49 UTC
The imageinfo reported by the API is wrong if an unrelated image is added to the query URL. This happens on de.wikipedia.

Compare the two urls below - the first URL returns the correct imageinfo for the Image "Datei:Zoe Gräfin Wassilko 1918.jpg", the second one does not:

url 1:

http://de.wikipedia.org/w/api.php?format=jsonfm&action=query&iiurlwidth=1200&iiprop=url|user|comment|url|sha1|size&prop=imageinfo|info&inprop=url&titles=Datei:Jordaki+Baron+Wassilko+von+Serecki+1855.jpg|Datei:Victor+Graf+Wassilko+v.+Serecki+1895.jpg|Datei:Stammwappen+Wassilko%2C+1676.jpg|Datei:Zoe+Gr%C3%A4fin+Wassilko+1918.jpg|Datei:Schloss+Berhometh+1905.jpg|Datei:Dokument+von+1428.jpg|Datei:Stephan+Graf+Wassilko+v.+Serecki+1918.jpg|Datei:Commons-logo.svg|Datei:Alexander+Graf+Wassilko+v.+Serecki+1916%2C+damals+Major.jpg|Datei:Freiherrn+Wassilko+von+Serecki.jpg|Datei:Grafen+Wassilko+von+Serecki.jpg|Datei:Nikolaus+Ritter+von+Wassilko.jpg

url 2:

http://de.wikipedia.org/w/api.php?format=jsonfm&action=query&iiurlwidth=1200&iiprop=url|user|comment|url|sha1|size&prop=imageinfo|info&inprop=url&titles=Datei:Jordaki+Baron+Wassilko+von+Serecki+1855.jpg|Datei:Victor+Graf+Wassilko+v.+Serecki+1895.jpg|Datei:Stammwappen+Wassilko%2C+1676.jpg|Datei:Zoe+Gr%C3%A4fin+Wassilko+1918.jpg|Datei:Schloss+Berhometh+1905.jpg|Datei:Dokument+von+1428.jpg|Datei:Stephan+Graf+Wassilko+v.+Serecki+1918.jpg|Datei:Commons-logo.svg|Datei:Alexander+Graf+Wassilko+v.+Serecki+1916%2C+damals+Major.jpg|Datei:Freiherrn+Wassilko+von+Serecki.jpg|Datei:Grafen+Wassilko+von+Serecki.jpg|Datei:Nikolaus+Ritter+von+Wassilko.jpg|Datei:Wappen+der+Ritter+von+Wassilko+1788.jpg

The only difference between the URLs is the additional image title at the end of url 2.

====

The relevant (and correct) imageinfo for url 1 is:

			"-4": {
				"ns": 6,
				"title": "Datei:Zoe Gr\u00e4fin Wassilko 1918.jpg",
				"missing": "",
				"imagerepository": "shared",
				"imageinfo": [
					{
						"user": "Sacha47",
						"size": 533162,
						"width": 1692,
						"height": 2332,
						"comment": "",
						"thumburl": "http:\/\/upload.wikimedia.org\/wikipedia\/commons\/thumb\/9\/9f\/Zoe_Gr%C3%A4fin_Wassilko_1918.jpg\/1200px-Zoe_Gr%C3%A4fin_Wassilko_1918.jpg",
						"thumbwidth": 1200,
						"thumbheight": 1654,
						"url": "http:\/\/upload.wikimedia.org\/wikipedia\/commons\/9\/9f\/Zoe_Gr%C3%A4fin_Wassilko_1918.jpg",
						"descriptionurl": "http:\/\/commons.wikimedia.org\/wiki\/File:Zoe_Gr%C3%A4fin_Wassilko_1918.jpg",
						"sha1": "1f090ed26b8eed26d4371f826ae51c532dfd3d9c"
					}
				],
				"fullurl": "http:\/\/de.wikipedia.org\/wiki\/Datei:Zoe_Gr%C3%A4fin_Wassilko_1918.jpg",
				"editurl": "http:\/\/de.wikipedia.org\/w\/index.php?title=Datei:Zoe_Gr%C3%A4fin_Wassilko_1918.jpg&action=edit"
			},



whereas url 2 yields the following, incorrect image info:



			"-4": {
				"ns": 6,
				"title": "Datei:Zoe Gr\u00c3\u00a4fin Wassilko 1918.jpg",
				"missing": "",
				"imagerepository": "",
				"fullurl": "http:\/\/de.wikipedia.org\/wiki\/Datei:Zoe_Gr%C3%83%C2%A4fin_Wassilko_1918.jpg",
				"editurl": "http:\/\/de.wikipedia.org\/w\/index.php?title=Datei:Zoe_Gr%C3%83%C2%A4fin_Wassilko_1918.jpg&action=edit"
			},

The different "title" in the response might be a hint to what goes wrong.
Comment 1 Brion Vibber 2012-05-23 21:03:24 UTC
In the second one it looks like input is being converted from ISO-8859-1 to UTF-8 (incorrectly so); usually this should only happen if there's a stray 8-bit character in the URL somewhere... not sure why it's kicking in here.
Comment 2 Brion Vibber 2012-05-23 21:12:00 UTC
Can't reproduce on a local trunk install; the character in the title makes it through intact and is correctly reported as missing.
Comment 3 Mark A. Hershberger 2012-05-24 14:48:41 UTC
(In reply to comment #2)
> Can't reproduce on a local trunk install; the character in the title makes it
> through intact and is correctly reported as missing.

marking unconfirmed as a result.
Comment 4 Umherirrender 2012-05-25 14:26:13 UTC
Use POST as a simply solution, for the rest see bug 36839

*** This bug has been marked as a duplicate of bug 36839 ***

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


Navigation
Links