Bug ID: 61341
           Summary: action=raw&templates=expand does not expand extension
                    tag parameters
           Product: MediaWiki
           Version: 1.22.1
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Unprioritized
         Component: Parser
       Web browser: ---
   Mobile Platform: ---

action=raw&templates=expand should return the source code of a page, with
templates within the page expanded. However, if these templates contains
extension tag that contains template parameters as value, these parameters are
not expanded.

For instance, take extension RawFile
( This extension introduce a
tag <file>:

  <file name="myfile" tag="pre">download</file>
  <pre>some text</pre>

When parsed, this tag generates HTML that allows downloading easily the content
of the <pre> block.

Now lets create a template {{download}}:

  <file name="{{{name}}}" tag="source">download</file>

If I create a page with as content:

  some text

Then downloading that page with ?action=raw&templates=expand would produce:

  <file name="{{{name}}}" tag="source">download</file>
  some text

When I would in fact expect:

  <file name="myfile" tag="source">download</file>
  some text

The strange thing is that the non-replacement only occurs if the tag is indeed
a registered tag. If the tag is not known, then all template parameters are
replace as in regular wikitext.

I think this the same problem that requires tag parser hook to call
$parser->recursiveTagParse( $text, $frame ) to have template parameters
expanded. I would recommend to expand recursively as well with option
templates=expand, or at least foresee another option (like templates=recurse or
template=expandrecurse) that would do the same.

You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to