Page MenuHomePhabricator

{{{{PAGENAME}}}} doesn't work
Open, Needs TriagePublic

Description

{{{{PAGENAME}}}} doesn't work.

  1. Have Template:X
  2. Go to page X or Help:X or in any other namespace
  3. add {{{{PAGENAME}}}} to the wikitext source

expected result: transcluded template:X
current result: {{{{PAGENAME}}}} displayed instead

Event Timeline

Danny_B created this task.May 29 2016, 12:16 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 29 2016, 12:16 PM
Base added a subscriber: Base.May 29 2016, 12:22 PM

{{ {{PAGENAME}} }} seems to work. {{ {{PAGENAME}}}} and {{{{PAGENAME}} }} work too.

Base added a comment.May 29 2016, 12:24 PM

Same thing with {{{{FULLPAGENAME}}}}

Base added a comment.EditedMay 29 2016, 12:28 PM

And {{{{TALKPAGENAME}}}}

Base added a comment.May 29 2016, 12:31 PM

And not just magic words. Just created [[user:Base/test]] with "test", but {{{{User:Base/test}}}} is shown unparsed the same way.

Can someone please provide a hyperlink to a test page showing this behavior?

Base added a comment.EditedMay 29 2016, 4:16 PM

https://test.wikipedia.org/wiki/User:Base/T136515 (despite it being in my userspace feel free to modify)

{{ {{PAGENAME}} }} seems to work. {{ {{PAGENAME}}}} and {{{{PAGENAME}} }} work too.

IMO, the second method here is the right way to do this, and this isn't a bug but rather intentional behavior.

{{ {{PAGENAME}} }} seems to work. {{ {{PAGENAME}}}} and {{{{PAGENAME}} }} work too.

IMO, the second method here is the right way to do this, and this isn't a bug but rather intentional behavior.

Is that documented somewhere? :-/

{{{{PAGENAME}}}} is interpreted as a named parameter {{{PAGENAME}}} inside single curly brackets.

On https://en.wikipedia.org/wiki/Template:X1 I previewed this:

{{{{PAGENAME}}}}

<noinclude>Transclusion: {{X1|PAGENAME=test}}</noinclude>

Result:

{{{{PAGENAME}}}}

Transclusion: {test}