Page MenuHomePhabricator

Allow "action=render" to retrieve just the content for special pages
Closed, DeclinedPublic

Description

Author: dtrebbien

Description:
Specifying action=render for any page title other than one starting with
Special: returns all XHTML that would normally appear inside of the
bodyContent div.

It would be nice if this worked with Special pages, too.


Version: unspecified
Severity: enhancement

Details

Reference
bz9796

Event Timeline

bzimport raised the priority of this task from to Lowest.Nov 21 2014, 9:40 PM
bzimport set Reference to bz9796.
bzimport added a subscriber: Unknown Object (MLST).

robchur wrote:

Please give an example of how this would be useful.

dtrebbien wrote:

Rendering pages through action=render is much faster. It would also help out bot
designers.

robchur wrote:

  1. No, it's not
  2. Bots should be using machine-readable interfaces, e.g. the API, or special

handlers for "action=raw" or similar

This would make it easier to dynamically retrieve content on special pages with
AJAX. For example, I am writing a script that displays subpages on the deletion
log. Loading the entire page makes it more difficult to work with, and increases
loading time for content that's stripped from the output anyway.

&action=raw does not work on special pages, apparently because they are not
output through the parser. That would be the ideal solution, combined with
machine-readable XML output (using the associated &ctype), but it sounds like
that would be difficult to implement.

&action=render would probably be much easier to implement, since it may not
involve changing the parser (only not displaying the surrounding skin). I looked
for a machine-readable interface with Special:Prefixindex-like functionality,
but couldn't find one.

robchur wrote:

Special pages are always assumed to be viewed; the entire path of execution is
passed off to the special page execution function, which will then determine
what action to take based on parameters, often from a POST. It doesn't have
anything to do with the parser.

Since a special page contains no "content", asking for it to be "rendered"
doesn't make as much sense. Both cases presented indicate the need to develop
our API and other machine-readable interfaces further, not add kludges to the
code to output "bits of the page".

dtrebbien wrote:

I did not know that there was an API. Sorry about this ...

  • Bug 13478 has been marked as a duplicate of this bug. ***