Page MenuHomePhabricator

rcnamespace=* does not include negative namespaces
Closed, ResolvedPublic

Description

Making an API call containing rcnamespace=* to get all namespaces does not include negative namespaces, like -1 for Special pages. For the most part, log actions do not take place in any negative namespace, however, logtype=abusefilter actually does. This is probably why it's taken so long for anyone to discover this.

To reproduce this, simply make an edit to an AbuseFilter, and then make two api calls. First something like /w/api.php?action=query&format=jsonfm&list=recentchanges&rcprop=title%7Cuser%7Cparsedcomment%7Cloginfo&rcshow=!bot&rclimit=20&rctype=log and then something like /w/api.php?action=query&format=jsonfm&list=recentchanges&rcnamespace=*&rcprop=title%7Cuser%7Cparsedcomment%7Cloginfo&rcshow=!bot&rclimit=20&rctype=log

The first result should contain the AbuseFilter edit, and in the second one it is mysteriously elided.

Event Timeline

Other modules probably have the same issue. In a quick search,

  • ApiQueryLogEvents
  • ApiQueryLinks – we don't currently record wikilinks to Special pages (see T19597) but it wouldn't hurt to support it in case we start to, and we do need it for prop=templates
  • ApiQueryAllLinks – for templates and redirects

Similar issues:

  • ApiQueryBacklinks – doesn't accept tititle=Special:Foo
  • ApiQueryBacklinksprop – ignores Special pages from titles

Change 330961 had a related patch set uploaded (by Anomie):
API: Allow finding log events and links to special pages

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

Change 330961 merged by jenkins-bot:
API: Allow finding log events and links to special pages

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