API talk:Parsing wikitext
Contents |
[edit] Minor issues with expandtemplates
Hi,
I just want to report two issues with expandtemplates :
- expandtemplates seems to work for only one level of templates (templates inside templates are not expanded)
- expandtemplates doesn't take into account <includeonly> or <noinclude>
For example, on the French Wikipedia, expandtemplates for {{e}} gives <includeonly>{{exp|e}}</includeonly><noinclude> {{/Documentation}} </noinclude>
- Possibly you should report this to http://bugzilla.wikimedia.org/, so the issues can be properly tracked and fixed. -- Tbleher 10:16, 22 January 2008 (UTC)
- Ok, done. There's the same problem for Special:ExpandTemplates. --NicoV 14:54, 22 January 2008 (UTC)
- Seems to be fixed --NicoV 17:54, 23 January 2008 (UTC)
- Ok, done. There's the same problem for Special:ExpandTemplates. --NicoV 14:54, 22 January 2008 (UTC)
[edit] error with parse...
i am getting the following return...
<?xml version="1.0"?> <api> <error code="params" info="The page parameter cannot be used together with the text and title parameters" xml:space="preserve">
my query string looks like this...
/api.php?action=parse&page=Houdini
i am using mw 1.15.1 i get nothing of value from the mw debug log and i have verified that my rewrite rules are not adding the title parameter. any thoughts? 67.97.209.36 14:25, 18 November 2009 (UTC)
- if i change my query string to this...
-
/api.php?action=parse&text={{Houdini}} - i get the expected result.
- 67.97.209.36 16:46, 18 November 2009 (UTC)
I'm seeing the same problems. I think we should write it up as a bug. --Duke33 01:58, 14 January 2010 (UTC)
- I took the liberty of writing it up:bugzilla:22684 --Duke33 17:16, 1 March 2010 (UTC)
[edit] Parsing into printable text ?
Hi,
Is there a way to parse a wiki text to get a simplified text (without HTML, external and internal replaced by their text, ...) ?
My need is the following :
- The project Check Wikipedia uses a configuration file for each wiki (for example: en)
- It's used among other things to generate pages in Wiki format (for example: en)
- In the configuration file, you can see for example a description of error n°1: error_001_desc_script=This article has no bold title like <nowiki>'''Title'''</nowiki>, so it contains Wiki text.
- I am writing a Java program (WikiCleaner) to help fixing the errors reported by this tool. I'd like to display this text in my program as a simple text: This article has no bold title like '''Title'''.
Thanks, NicoV --16:33, 28 March 2010 (UTC)
[edit] Error with DPL
DPL and DPL in templates are not expanded. e.g. these fail
- api.php?action=query&prop=revisions&titles=yourtitle&rvprop=content&rvexpandtemplates
- api.php?action=expandtemplates&text=Template:TemplateWithDPL
Hamishwillee 00:02, 19 July 2010 (UTC)