[go: up one dir, main page]

Page MenuHomePhabricator

Unable to get imageinfo only for the latest revision
Open, Needs TriagePublicBUG REPORT

Description

List of steps to reproduce:

What happens?:

I get a response with continue field, despite setting iilimit=1 (which is default, so this happens also without iilimit).

What should have happened instead?:

There should be no continue field, I am requesting only one (latest) imageinfo for the file. It seems there is no way really to request only the latest revision.

The issue with continue field is that if I have generic API code which traverses continue automatically, until batchcomplete=true, then it will traverse here many pages, to get all revisions of a file. But I would like to request only one/latest revision.

Event Timeline

If you only request one image it is not possible for the imageinfo to know if the limit should be for all the file revisions or for each file. Same problem is on prop=revisions, but there the doc is more readable about that.

When requesting at least two images it does not continue - https://commons.wikimedia.org/w/api.php?action=query&formatversion=2&iiprop=mime|size|url&prop=imageinfo&redirects=&titles=File%3ALogo+Google+2013+Official.svg|File%3AChurch+of+the+Redeemer,+Toronto,+Canada.jpg&iilimit=1

But would return up to the limit file revisions per file, which is also strange (T30559).