Difference between revisions of "Issue:Including nested templates no longer works with MW 1.12's new parser behaviour"

From FollowTheScore
Jump to: navigation, search
(Reply)
(New section: Third-party comments)
Line 51: Line 51:
 
</nowiki></pre>
 
</nowiki></pre>
 
:[[User:Gero|Gero]] 08:07, 28 March 2008 (CET)
 
:[[User:Gero|Gero]] 08:07, 28 March 2008 (CET)
 +
 +
== Third-party comments ==
 +
 +
* [https://bugzilla.wikimedia.org/show_bug.cgi?id=5678 Bug 5678] is a calamity for DPL2. All ²{ }² calls are now broken! What's gotten into their minds, breaking stuff and not even suggesting a workaround? -- [[User:Rasqual|Rasqual]] 15:42, 6 April 2008 (CEST)

Revision as of 15:42, 6 April 2008

Description: Including nested templates no longer works with MW 1.12's new parser behaviour
Extension / Version: DPL   /   1.6.8
Type / Status: Bug   /   open

Problem

Including nested templates no longer works with MW 1.12's new parser behaviour.

Pre 1.12 behaviour

{{#dpl:title=Random|include={Template Name}:Parameter}}


Which until 1.12 outputted the contents of the field, even if it contained another (nested) template.

Article random contents

{{Template Name
Parameter = {{Another Template|Something}} 
}}

Post 1.12 behaviour

{{#dpl:title=Random|include={Template Name}:Parameter}}


Now outputs:


{{Another Template|Something}} (Without parsing it)

Reply

This is surprising! As far as I understand the new MW parser version will never allow the kind of constructs you mention. http://svn.wikimedia.org/svnroot/mediawiki/tags/REL1_12_0RC1/phase3/RELEASE-NOTES contains a chapter on parser changes which states that the parsing sequence has intentionally been changed and now no longer supports the construction of template code by other templates.

Could somebody find out how to nest templates in future (regardless of DPL)? I think the developers of the MW parser should be told that they are going to cut down a useful behaviour. What alternative do they offer? I would be pleased if you could find out!

citation:

 Uncovered preprocessor syntax is generally not recognised. For example, if you
 have "{{a" in Template:A and "b}}" in Template:B, then "{{a}}{{b}}" will be
 converted to a literal "{{ab}}" rather than the contents of Template:Ab. This
 was the case previously in HTML output mode, and is now uniformly the case in
 the other modes as well. HTML-style comments uncovered by template expansion
 will not be recognised by the preprocessor and hence will not prevent template
 expansion within them, but they will be stripped by the following HTML security
 pass
Gero 08:07, 28 March 2008 (CET)

Third-party comments

  • Bug 5678 is a calamity for DPL2. All ²{ }² calls are now broken! What's gotten into their minds, breaking stuff and not even suggesting a workaround? -- Rasqual 15:42, 6 April 2008 (CEST)