{{{{PAGENAME}}}} doesn't work.
- Have Template:X
- Go to page X or Help:X or in any other namespace
- add {{{{PAGENAME}}}} to the wikitext source
expected result: transcluded template:X
current result: {{{{PAGENAME}}}} displayed instead
{{{{PAGENAME}}}} doesn't work.
expected result: transcluded template:X
current result: {{{{PAGENAME}}}} displayed instead
And not just magic words. Just created [[user:Base/test]] with "test", but {{{{User:Base/test}}}} is shown unparsed the same way.
https://test.wikipedia.org/wiki/User:Base/T136515 (despite it being in my userspace feel free to modify)
IMO, the second method here is the right way to do this, and this isn't a bug but rather intentional behavior.
{{{{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}