Page MenuHomePhabricator

imageinfo should return info for other files when one file gets a iiurlparamnormal error.
Open, LowPublic

Description

I've been working on a tool that uses the imageinfo API to get thumbnail urls and their heights for all the files contributed by a set of users. I query a batch of files, but one file that hits the iiurlparamnormal error ruins a whole query.

For example:

https://commons.wikimedia.org/w/api.php?action=query&titles=File:Jewish_Encyclopedia_Volume_6.pdf|File:Example.jpg&prop=imageinfo&iilimit=50&iiend=2007-12-31T23:59:59Z&iiprop=timestamp|user|url&iiurlheight

It would be nice if this query still returned the data for the file that doesn't hit the iiurlparamnormal error and just returned the error info inside that item for that file. Even better would be if it still returned other requested data for the file, and simply left out the height value that can't be calcuated.

Slightly better than the status quo would be if the error message included the pageid and not just the file name.

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
OpenNone
DeclinedNone
InvalidNone
OpenNone
InvalidNone
OpenBUG REPORTNone
OpenNone
OpenNone
OpenLadsgroup
ResolvedKrinkle
ResolvedLadsgroup
Resolvedmforns
ResolvedLadsgroup
ResolvedLadsgroup
ResolvedLadsgroup
Resolved Zabe
ResolvedDreamy_Jazz
ResolvedLadsgroup
ResolvedLadsgroup
DuplicateNone
Resolved Zabe
OpenLadsgroup
Open Zabe
OpenPRODUCTION ERRORNone
ResolvedPRODUCTION ERROR Zabe
ResolvedPRODUCTION ERROR Zabe
ResolvedPRODUCTION ERROR Zabe
ResolvedSecurity Zabe
ResolvedBUG REPORTLadsgroup
Open Zabe

Event Timeline

Ragesoss raised the priority of this task from to Needs Triage.
Ragesoss updated the task description. (Show Details)
Ragesoss added a project: MediaWiki-Action-API.
Ragesoss subscribed.

I'll note that this URL doesn't seem to produce any errors now.

{
    "batchcomplete": "",
    "query": {
        "normalized": [
            {
                "from": "File:Jewish_Encyclopedia_Volume_6.pdf",
                "to": "File:Jewish Encyclopedia Volume 6.pdf"
            }
        ],
        "pages": {
            "6428847": {
                "pageid": 6428847,
                "ns": 6,
                "title": "File:Example.jpg",
                "imagerepository": "local",
                "imageinfo": [
                    {
                        "timestamp": "2010-03-14T17:20:20Z",
                        "user": "Bdk",
                        "thumburl": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Example.jpg/1px-Example.jpg",
                        "thumbwidth": 1,
                        "thumbheight": 0,
                        "url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg",
                        "descriptionurl": "https://commons.wikimedia.org/wiki/File:Example.jpg",
                        "descriptionshorturl": "https://commons.wikimedia.org/w/index.php?curid=6428847"
                    }
                ]
            },
            "28591020": {
                "pageid": 28591020,
                "ns": 6,
                "title": "File:Jewish Encyclopedia Volume 6.pdf",
                "imagerepository": "local",
                "imageinfo": [
                    {
                        "timestamp": "2016-02-25T13:26:10Z",
                        "user": "Skim",
                        "thumburl": "https://upload.wikimedia.org/wikipedia/commons/thumb/9/97/Jewish_Encyclopedia_Volume_6.pdf/page1-1px-Jewish_Encyclopedia_Volume_6.pdf.jpg",
                        "thumbwidth": 1,
                        "thumbheight": 0,
                        "url": "https://upload.wikimedia.org/wikipedia/commons/9/97/Jewish_Encyclopedia_Volume_6.pdf",
                        "descriptionurl": "https://commons.wikimedia.org/wiki/File:Jewish_Encyclopedia_Volume_6.pdf",
                        "descriptionshorturl": "https://commons.wikimedia.org/w/index.php?curid=28591020"
                    },
                    {
                        "timestamp": "2013-09-26T16:23:46Z",
                        "user": "John Carter",
                        "thumburl": "https://commons.wikimedia.org/w/resources/assets/file-type-icons/fileicon-pdf.png",
                        "thumbwidth": 120,
                        "thumbheight": 120,
                        "url": "https://upload.wikimedia.org/wikipedia/commons/archive/9/97/20160225132600%21Jewish_Encyclopedia_Volume_6.pdf",
                        "descriptionurl": "https://commons.wikimedia.org/wiki/File:Jewish_Encyclopedia_Volume_6.pdf",
                        "descriptionshorturl": "https://commons.wikimedia.org/w/index.php?curid=28591020"
                    }
                ]
            }
        }
    }
}