https://bugzilla.wikimedia.org/show_bug.cgi?id=71389

            Bug ID: 71389
           Summary: action=query&list=deletedrevs with a new-style
                    continuation fails
           Product: MediaWiki
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: API
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
       Web browser: ---
   Mobile Platform: ---

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.

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

First query:
https://fr.wikipedia.org/w/api.php?action=query&list=deletedrevs&titles=Utilisateur:Orlodrim/R%C3%A9f%C3%A9rences%20incorrectes&drprop=user&drstart=2013-11-30T14:25:56Z&drlimit=1&continue=
Result:
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:
https://fr.wikipedia.org/w/api.php?action=query&list=deletedrevs&titles=Utilisateur:Orlodrim/R%C3%A9f%C3%A9rences%20incorrectes&drprop=user&drstart=2013-11-30T14:25:56Z&drlimit=1&continue=-||&drcontinue=2|Orlodrim/R%C3%A9f%C3%A9rences_incorrectes|20131128195552|6069941
Result:
<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
https://fr.wikipedia.org/wiki/%F0%9F%9A%80):
1.
https://fr.wikipedia.org/w/api.php?action=query&list=deletedrevs&titles=Utilisateur:Orlodrim/R%C3%A9f%C3%A9rences%20incorrectes&drprop=user&drlimit=1&continue=
2.
https://fr.wikipedia.org/w/api.php?action=query&list=deletedrevs&titles=Utilisateur:Orlodrim/R%C3%A9f%C3%A9rences%20incorrectes&drprop=user&drlimit=1&continue=-||&drcontinue=2|Orlodrim/R%C3%A9f%C3%A9rences_incorrectes|20131208231758|6069944

Sequence that works:
1.
https://fr.wikipedia.org/w/api.php?action=query&list=deletedrevs&titles=A-Live&drprop=user&drlimit=1&continue=https://fr.wikipedia.org/w/api.php?action=query&list=deletedrevs&titles=A-Live&drprop=user&drlimit=1&continue=
2.
https://fr.wikipedia.org/w/api.php?action=query&list=deletedrevs&titles=A-Live&drprop=user&drlimit=1&continue=https://fr.wikipedia.org/w/api.php?action=query&list=deletedrevs&titles=A-Live&drprop=user&drlimit=1&continue=-||&drcontinue=0|A-Live|20081002173128|5600890

== Investigation ==

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".

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to