Page MenuHomePhabricator

action=query&list=deletedrevs with a new-style continuation fails
Closed, ResolvedPublic


When I call action=query&list=deletedrevs&titles=... with the new mode for continuation (continue=) and there are more results than the limit and drstart is set, the second query fails. If drstart is not set, the result of the second query sometimes contain deleted revisions of another page.


You need to be a sysop on frwiki to see the results.

First query:
Information on one deleted revision as expected + the following tag for continuation:
<continue drcontinue="2|Orlodrim/Références_incorrectes|20131128195552|6069941" continue="-||" />

Second query:||&drcontinue=2|Orlodrim/R%C3%A9f%C3%A9rences_incorrectes|20131128195552|6069941
<error code="drbadparams" info="The start parameter cannot be used in mode 3" xml:space="preserve">

Expected result: no error and information about the next deleted revision of the same page.

If drstart is not set, there is no error, but the result is sometimes invalid:

Sequence that does not work (the second query returns a deleted revision of


Sequence that works:



I noticed that if the "continue" parameter is equal to "-||", $generatorDone is set to true in ApiQuery::execute(), so mPageSet is not initialized. Because of that, ApiQueryDeletedrevs is in mode 3 ("List all deleted revisions in the given namespace") instead of mode 1 ("List deleted revisions for the given title"). If I manually replace "-||" with "||" in the "continue" parameter, the second query works.

ApiResult::endContinuation() sets "continue" to "-||" if "Generator and prop modules are all done". I believe that the root cause is the incorrect assumption that "action=query&list=..." never makes use of the "titles" parameter.

However, I do not understand why it does not consistently fail without "drstart".

Version: 1.24rc
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:45 AM
bzimport set Reference to bz71389.
bzimport added a subscriber: Unknown Object (MLST).

The root cause here is that "list=deletedrevs" is pretending to be a "prop" module when it's actually not. The new-style continuation doesn't know it's pretending to be a prop module, so it doesn't set the continuation fields correctly.

I'm inclined to deprecate list=deletedrevs using the pageset at all, and instead add all three of "drtitles", "drpageids", and "drrevids" to make it more like all other 'list' submodules. I'll have to check whether anyone is using list=deletedrevs with a generator though, as "drgenerator" would be insane. Or else make something like "prop=deletedrevisions" for mode 1 and "list=alldeletedrevisions" for modes 2 and 3, and deprecate list=deletedrevs entirely.

Change 168646 had a related patch set uploaded by Anomie:
API: Split list=deletedrevs into prop=deletedrevisions and list=alldeletedrevisions

Change 168646 merged by jenkins-bot:
API: Split list=deletedrevs into prop=deletedrevisions and list=alldeletedrevisions