Last modified: 2011-04-03 17:10:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30267, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28267 - Allow also parsing of wikitext for action=expandtemplates
Allow also parsing of wikitext for action=expandtemplates
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.18.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Roan Kattouw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-26 21:30 UTC by db [inactive,noenotif]
Modified: 2011-04-03 17:10 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description db [inactive,noenotif] 2011-03-26 21:30:28 UTC
It can be nice to get the html for the input text. Thanks.
Comment 1 Roan Kattouw 2011-03-27 13:56:59 UTC
That's what action=parse is for.
Comment 2 db [inactive,noenotif] 2011-04-01 14:57:17 UTC
this bug was for getting the html along with the expand template text or generate xml, but it is no problem to call also action=parse.

Alternativ it is possible to query prop=revisions (for existing pages)
Comment 3 MZMcBride 2011-04-01 15:00:46 UTC
I'm not quite sure if this is invalid. It would be nice in some cases if the extension "ExpandTemplates" had the option to output into HTML rather than outputting the (somewhat final) wikitext. Perhaps this bug needs to be refocused? If you built the option into the extension, the API module could then follow with its own option to provide the parsed wikitext (which would just be a wrapper for action=parse, yes). This should probably be poked at a bit more, so re-opening for now.
Comment 4 Roan Kattouw 2011-04-03 11:03:48 UTC
(In reply to comment #3)
> I'm not quite sure if this is invalid. It would be nice in some cases if the
> extension "ExpandTemplates" had the option to output into HTML rather than
> outputting the (somewhat final) wikitext. Perhaps this bug needs to be
> refocused? If you built the option into the extension, the API module could
> then follow with its own option to provide the parsed wikitext (which would
> just be a wrapper for action=parse, yes). This should probably be poked at a
> bit more, so re-opening for now.
action=expandtemplates is not an extension, it's in core. Special:ExpandTemplates is an extension, yes. The API has expanding to wikitext and parsing to HTML both built into core. If you want Special:Expandtemplates to be able to parse to HTML, that's not an API bug (not even a core bug, since it's an extension).

Your comment confuses me and I don't understand what you want exactly, so I'm reclosing this bug. Please state what you want more clearly and either reopen this bug (if it's an API change) or file a new one (if it's a change to something else).
Comment 5 MZMcBride 2011-04-03 17:10:42 UTC
(In reply to comment #4)
> action=expandtemplates is not an extension, it's in core.

Oh, that's confusing. I thought we were talking about the API module for the extension. Okay, that makes more sense now. (Though, really, the API module is pretty much the identical functionality of the extension, it's just in core.)

> Your comment confuses me and I don't understand what you want exactly, so I'm
> reclosing this bug. Please state what you want more clearly and either reopen
> this bug (if it's an API change) or file a new one (if it's a change to
> something else).

The original request was for an option to expand page content directly into HTML from action=expandtemplates (and actually, it looks like the subsequent comment wanted to get the XML, wikitext, and/or HTML all at once, simultaneously).

You're suggesting using the parse module instead. Your solution requires an extra request, but it's probably the more sane approach. I know personally when I've used the Special:ExpandTemplates extension UI, it would've been helpful to be able to get the output in HTML rather than in wikitext, but for developers/programmers, the overhead of an extra API request probably isn't high enough to warrant adding an option to the expandtemplates module.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links