Continue returns the same data and iicontinue value over and over for some imageinfo queries
Open, Needs TriagePublic

Description

I ran into a problem where continue did not work properly with an imageinfo query:

https://commons.wikimedia.org/w/api.php?action=query&continue=&format=json&iilimit=50&iiprop=url&iiurlheight=480&pageids=3982584|3982588|3982595|3982603|3982606|3982617|3982634|3982639|3987381|3988044|3988237|3988332|3988424|3988480|3991285|3992308|3992901|3992908|3992939|3993018|3994073|3994076|3994083|3994195|3994505|3994506|3994508|3994510|3994584|3994630|3994692|3997992|4016017|4030078|4030104|4030351|4031166|4033567|4034071|4034081|4034085|4039921|4040180|4040191|4040194|4040220|4040222|4048502|4051075|4068154&prop=imageinfo

The first query returns this : {"continue":{"iicontinue":"Barack_Obama.jpg|20081103215509","continue":"||"}
The second query returns this: {"continue":{"iicontinue":"Barack_Obama.jpg|20080913075003","continue":"||"}

After that, using the second continue returns the same data and continue value again (and again and again).

https://commons.wikimedia.org/w/api.php?action=query&continue=&iicontinue=Barack_Obama.jpg|20080913075003&format=json&iilimit=50&iiprop=url&iiurlheight=480&pageids=3982584|3982588|3982595|3982603|3982606|3982617|3982634|3982639|3987381|3988044|3988237|3988332|3988424|3988480|3991285|3992308|3992901|3992908|3992939|3993018|3994073|3994076|3994083|3994195|3994505|3994506|3994508|3994510|3994584|3994630|3994692|3997992|4016017|4030078|4030104|4030351|4031166|4033567|4034071|4034081|4034085|4039921|4040180|4040191|4040194|4040220|4040222|4048502|4051075|4068154&prop=imageinfo

Ragesoss created this task.Jun 5 2015, 5:45 PM
Ragesoss updated the task description. (Show Details)
Ragesoss raised the priority of this task from to Needs Triage.
Ragesoss added a project: MediaWiki-API.
Ragesoss added subscribers: Ragesoss, Anomie.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 5 2015, 5:45 PM
Anomie added a comment.Jun 5 2015, 7:20 PM

No, in this case it's because the file in question is File:ObamaBarack.jpg but the continuation is bypassing the redirect to return "Barack_Obama.jpg". And then continuing from "Barack_Obama.jpg" winds up needing continuation in the middle of File:ObamaBarack.jpg again, rinse, repeat.

Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Jun 5 2015, 8:59 PM