Steps to replicate:
- Perform the API query https://en.wikipedia.org/w/api.php?action=query&errorformat=html&prop=revisions&rvslots=main&titles=Obama&formatversion=2&rvprop=content&rvlimit=600
- For users with apihighlimits change rvlimit to 6000 instead to replicate the bug.
Expected output:
- A single outofrange warning with text "The value \"600\" for parameter \"rvlimit\" must be between 1 and 50."
Actual output:
- Response contains 2 outofrange warnings:
"warnings": [ { "code": "outofrange", "text": "The value \"600\" for parameter \"rvlimit\" must be between 1 and 500.", "data": { "min": 1, "curmax": 500, "max": 500, "highmax": 5000 }, "module": "query+revisions" }, { "code": "outofrange", "text": "The value \"500\" for parameter \"rvlimit\" must be between 1 and 50.", "data": { "min": 1, "curmax": 50, "max": 50, "highmax": 500 }, "module": "query+revisions" } ]
With the default legacy errorformat, there is a single warning with confusing text instead:
"warnings": "The value \"600\" for parameter \"rvlimit\" must be between 1 and 500.\nThe value \"500\" for parameter \"rvlimit\" must be between 1 and 50."
This appears to be because ApiQueryRevisions has a limit of 500, but it's reduced to 50 when rvprop=content is enabled.