Last modified: 2014-10-23 16:20:07 UTC
If TemplateData is added to a template page (not a /doc subpage), then it needs to be wrapped in <noinclude> tags.
Maybe. I'd rather we just fix bug 54140 instead.
Well how would we distinguish a documentation subpage from a "proper" template page?
It's possible that TemplateData could be noinclude'd no matter what. (Would nested noinclude tags cause problems?) Otherwise, I think we'd have to make assumptions based on the page name. Different wikis use different names, but most use /doc (and/or one other variant), and I've not yet seen an actual template subpage using those names.
(In reply to WhatamIdoing from comment #3) > Otherwise, I think we'd have to make assumptions based on the page name. > Different wikis use different names, but most use /doc (and/or one other > variant), and I've not yet seen an actual template subpage using those names. Okay, how do you plan for this to work on the ... Swahili Wikia? (if such a thing exists)
I assume that the system would be essentially like this: * If the TemplateData is being added to Template:Foo, then add noinclude tags around it. * If the TemplateData is being added to Template:Foo/subpage, then check the name of the subpage. ** If $local-variable is set, amd the subpage matches the local variable, then skip the noinclude tags. ** If $local-variable is not set, and the subpage is $mw-default-subpage (which should be set to "/doc"), then skip the noinclude tags. ** Otherwise, assume the subpage is a real template and add noinclude tags. This means that the way it would work on some future Swahili Wikia is "the local sysops would set the local variable". At the Swahili Wikipedia, local admins would set it to /hati (their preferred page name). If local sysops did not define the variable, and also didn't use the default subpage name, and someone added TemplateData to a documentation page that the extension treated as a real template, then it would get an "extra" set of noinclude tags (one that it adds and one that the doc page's transclusion adds). I'm not sure that this would harm anything at all, but it's preseumably something to test.
This has caused a few problems on the en wiki. As I discuss at https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&diff=prev&oldid=628346583 it affected over 100 article space pages as anons and newer users have used the button and created template data blocks outside of <noinclude> tags. This then gets transcluded into main space articles. Examples include http://en.wikipedia.org/w/index.phptitle=Template:Roman_Catholic_Cathedrals_in_Great_Britain_and_Ireland&diff=prev&oldid=626352880 http://en.wikipedia.org/w/index.php?title=Template:Punknews&diff=prev&oldid=628254485 http://en.wikipedia.org/w/index.phptitle=Template:List_of_Philippine_seas&diff=prev&oldid=625635816 http://en.wikipedia.org/w/index.phptitle=Template:ABC_Mindanao&diff=prev&oldid=622140533 A list of page affect is at http://en.wikipedia.org/w/index.php?title=Wikipedia:TemplateData/List&oldid=628258871 I've fixed all the current boken templates.
(In reply to Alex Monk from comment #2) > Well how would we distinguish a documentation subpage from a "proper" > template page? If the title has a "/" in it assume that it's OK to put in without <noinclude>s?
Change 165908 had a related patch set uploaded by Mooeypoo: Add <noinclude> tags to new <templatedata> strings https://gerrit.wikimedia.org/r/165908
Change 165908 merged by jenkins-bot: Add <noinclude> tags to new <templatedata> strings https://gerrit.wikimedia.org/r/165908
really fixed? https://cs.wikipedia.org/w/index.php?title=%C5%A0ablona:Infobox_-_s%C3%ADdlo&diff=11940098&oldid=11761581
(In reply to JAn Dudík from comment #10) > really fixed? > https://cs.wikipedia.org/w/index.php?title=%C5%A0ablona:Infobox_- > _s%C3%ADdlo&diff=11940098&oldid=11761581 It will be deployed to cswiki in a few hours…