Page MenuHomePhabricator

API allpages does not return proofread property for all pages
Closed, ResolvedPublic

Description

The following query:
http://en.wikisource.org/w/api.php?inprop=protection&maxlag=5&gaplimit=500&generator=allpages&format=jsonfm&gapprefix=Love_among_the_chickens_%281909%29.djvu&prop=info|imageinfo|categoryinfo|proofread&gapnamespace=104&continue=&meta=userinfo&indexpageids=&action=query&iiprop=timestamp|user|comment|url|size|sha1|metadata&gapfrom=!&uiprop=blockinfo|hasmsg

from page /144 does not return proofread property:

...
"1642555": {
    "pageid": 1642555,
    "ns": 104,
    "title": "Page:Love among the chickens (1909).djvu/143",
    "contentmodel": "proofread-page",
    "pagelanguage": "en",
    "touched": "2014-11-13T03:17:12Z",
    "lastrevid": 4888277,
    "length": 943,
    "protection": [],
    "restrictiontypes": [
        "edit",
        "move"
    ],
    "proofread": {
        "quality": 4,
        "quality_text": "Validated"
    }
},
"1642557": {
    "pageid": 1642557,
    "ns": 104,
    "title": "Page:Love among the chickens (1909).djvu/144",
    "contentmodel": "proofread-page",
    "pagelanguage": "en",
    "touched": "2015-03-08T00:05:15Z",
    "lastrevid": 4888278,
    "length": 925,
    "protection": [],
    "restrictiontypes": [
        "edit",
        "move"
    ]
},
...

A shorter query does:
http://en.wikisource.org/w/api.php?inprop=protection&maxlag=5&gaplimit=500&generator=allpages&format=jsonfm&gapprefix=Love_among_the_chickens_%281909%29.djvu/14&prop=info|imageinfo|categoryinfo|proofread&gapnamespace=104&continue=&meta=userinfo&indexpageids=&action=query&iiprop=timestamp|user|comment|url|size|sha1|metadata&gapfrom=!&uiprop=blockinfo|hasmsg

...
"1642555": {
    "pageid": 1642555,
    "ns": 104,
    "title": "Page:Love among the chickens (1909).djvu/143",
    "contentmodel": "proofread-page",
    "pagelanguage": "en",
    "touched": "2014-11-13T03:17:12Z",
    "lastrevid": 4888277,
    "length": 943,
    "protection": [],
    "restrictiontypes": [
        "edit",
        "move"
    ],
    "proofread": {
        "quality": 4,
        "quality_text": "Validated"
    }
},
"1642557": {
    "pageid": 1642557,
    "ns": 104,
    "title": "Page:Love among the chickens (1909).djvu/144",
    "contentmodel": "proofread-page",
    "pagelanguage": "en",
    "touched": "2015-03-08T00:05:15Z",
    "lastrevid": 4888278,
    "length": 925,
    "protection": [],
    "restrictiontypes": [
        "edit",
        "move"
    ],
    "proofread": {
        "quality": 4,
        "quality_text": "Validated"
    }
   ...

Event Timeline

Mpaa raised the priority of this task from to Needs Triage.
Mpaa updated the task description. (Show Details)
Mpaa subscribed.
Mpaa added a subscriber: Tpt.

The cause of the issue is that ProofreadPage does an internal API request to retrieve quality levels and, so, is affected by the default limit (50 I believe): https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FProofreadPage.git/d16b90fed6d709f4dff8c4ea9d5412ebcf9d8fbf/ApiQueryProofread.php#L57

Anomie subscribed.
In T91912#1098836, @Tpt wrote:

The cause of the issue is that ProofreadPage does an internal API request

Eeew.

Access Index page as it will provide proofread property for all pages.

Change 222849 had a related patch set uploaded (by Tpt):
Makes api prop=proofread pass context to its subrequest

https://gerrit.wikimedia.org/r/222849

Change 222849 merged by jenkins-bot:
Makes api prop=proofread pass context to its subrequest

https://gerrit.wikimedia.org/r/222849