Page MenuHomePhabricator

Cannot transclude <poem> in templates
Open, LowPublic

Description

Hi there, I would like to define a template, say {{my-begin}}, to start a <poem> (and other stuff). Then another one, say {{my-end}}, to finish the </poem> (and other stuff).
Note that I have activated the poem tag on my wiki, and it works just fine. However, if I define the first template to be exactly "<poem>", and the other one to be exactly "</poem>", it doesn't work. Perhaps the first template works, but the closing tag is shown verbatim as "</poem>" in the rendered contents of the wiki. Mysteriously, the trick works just fine with a less exotic "<b>" and "</b>" pair.

I have recreated the problem (with a few variations) here:
https://www.mediawiki.org/wiki/User:Hopefully_Acceptable_Username#Poem_testing

Thanks

Product Version
MediaWiki 1.26.2
PHP 5.4.43 (cgi-fcgi)
MySQL 5.5.42-37.1-log
ICU 4.2.1

Event Timeline

Hopefully.Acceptable.Username renamed this task from Cannot transclude &lt;poem> in templates to Cannot transclude <poem> in templates.Jul 31 2016, 5:28 PM
Zppix triaged this task as Low priority.Jul 31 2016, 5:29 PM
Zppix subscribed.

usually templates are made to be subst'ed usually transclusion is mainly for maintenance templates. Maybe @Aklapper could confirm?

I guess mine would be "maintenance templates". I need to be able to change the presentation of hundreds of pages with a single change, if I wanted to change from <poem> to something else tomorrow. Also there is other formatting going on, like table, etc.

Hmmm... ok i'm a little iffy on templates so I cannot reliably give you a solution. My opinion is that maybe see if its an error in the code of your template? If not then it may be a deappreciated tag (<poem>)

Ok, then possibly template code and/or differences in programmings langs having some conflicts internally... if anyone else has any thing to add feel free to pop in.

matmarex subscribed.

I think what you want is intentionally not possible.