Page MenuHomePhabricator

Implement support for special pages in action=query
Closed, ResolvedPublic

Description

http://en.wikipedia.org/w/api.php?action=query&titles=Main_Page|Special:AllPages

<warnings>
  <query xml:space="preserve">No support for special pages has been implemented</query>
</warnings>

This causes bug 24181 among other things. While that can be fixed in the client code, it shouldn't be very hard to support special pages at least for existence checks. We would need to be careful to ensure that special pages aren't accidentally fed to modules that can't handle them or where they don't make sense.


Version: 1.17.x
Severity: enhancement

Details

Reference
bz24185

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:07 PM
bzimport set Reference to bz24185.

Partially bug 14869 ? ;D

/me ducks

:P

(In reply to comment #1)

Partially bug 14869 ? ;D

/me ducks

:P

Heh.

No, not really. This is just about creating a Title object for Special: pages and actually doing something with it (normalization, existence check) rather than detecting that $title->getNamespace() < 0 (catches NS_MEDIA as well as NS_SPECIAL) and freaking out.

bug 21991 is for normalising things like title validation too...

(In reply to comment #3)

bug 21991 is for normalising things like title validation too...

Yeah, although that deals with user titles mostly. 'Normal' titles aren't validated in the parameter handling code ATM, each module validates them themselves and has different requirements (title must exist for move but not for edit, etc.). We could centralize this in the spirit of bug 21991, but that doesn't really overlap much with this bug, which is about getting some non-zero support for special pages in ApiPageSet.

Bryan.TongMinh wrote:

Do you also want to include NS_MEDIA pages or only NS_SPECIAL?