I'm not sure if this is by design, but it seems when using a tag extension inside of a template, the tag extension is not passed the correct frame information about the template when using subst: or Parser::preprocess
For example: The contents of Template:Test are:
<SomeTagExtension> {{{1}}} </SomeTagExtension>
When using {{subst:Test|Hello World}} You get
<SomeTagExtension> {{{1}}} </SomeTagExtension>
Even if SomeTagExtension is correctly using $parser->recursiveTagParse.
It seems the $frame value does not contain the template variables when using subst or preprocess. The frame object type is PPFrame_DOM instead of PPTemplateFrame_DOM.
Am I doing something wrong, is this by design, or is it a bug?
Thanks Andrew
On 10/09/2012 06:52 PM, Andrew Fitzgerald wrote:
I'm not sure if this is by design, but it seems when using a tag extension inside of a template, the tag extension is not passed the correct frame information about the template when using subst: or Parser::preprocess
For example: The contents of Template:Test are:
<SomeTagExtension> {{{1}}} </SomeTagExtension>
When using {{subst:Test|Hello World}} You get
<SomeTagExtension> {{{1}}} </SomeTagExtension>
Even if SomeTagExtension is correctly using $parser->recursiveTagParse.
It seems the $frame value does not contain the template variables when using subst or preprocess. The frame object type is PPFrame_DOM instead of PPTemplateFrame_DOM.
Am I doing something wrong, is this by design, or is it a bug?
Thanks Andrew _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Extension tags are intentionally shielded from the parser and the preprocessor. The lack of PSTs in extension tags is a long-standing bug: < https://bugzilla.wikimedia.org/show_bug.cgi?id=2700%3E.
—Victor.
wikitech-l@lists.wikimedia.org