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

       Web browser: ---
             Bug #: 31901
           Summary: missing "query"-element when no titles specified
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: Unprioritized
         Component: API
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified


When I try to get info for a set of pages specified by a generator and that
generator returns nothing, I'd expect to get an empty set. But you just get no
set!
Example:
http://de.wikipedia.org/w/api.php?action=query&list=allpages&apprefix=DoesNotExist
<api>
  <query>
    <allpages />
  </query>
</api>
http://de.wikipedia.org/w/api.php?action=query&prop=revisions&generator=allpages&gapprefix=DoesNotExist
Actual result:
<api />
But Expected:
<api>
  <query>
    <pages />
  </query>
</api>

Or is it a feature? I think its hard to detect when parsing the result, because
you usually step through these elements when trying to get your pageset. Then
you never know whether its an error in your request, an server error (api
error) or its just empty results.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- 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