Last modified: 2014-10-23 16:20:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T71149, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69149 - TemplateData: If TemplateData is added to a template page (not a /doc subpage), then it needs to be wrapped in <noinclude> tags
TemplateData: If TemplateData is added to a template page (not a /doc subpag...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
TemplateData (Other open bugs)
unspecified
All All
: High enhancement (vote)
: ---
Assigned To: Moriel Schottlender
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-05 16:43 UTC by WhatamIdoing
Modified: 2014-10-23 16:20 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description WhatamIdoing 2014-08-05 16:43:36 UTC
If TemplateData is added to a template page (not a /doc subpage), then it needs to be wrapped in <noinclude> tags.
Comment 1 James Forrester 2014-08-05 16:54:34 UTC
Maybe. I'd rather we just fix bug 54140 instead.
Comment 2 Alex Monk 2014-08-05 17:00:44 UTC
Well how would we distinguish a documentation subpage from a "proper" template page?
Comment 3 WhatamIdoing 2014-08-05 18:19:01 UTC
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.
Comment 4 Alex Monk 2014-08-05 19:39:31 UTC
(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)
Comment 5 WhatamIdoing 2014-08-05 22:14:02 UTC
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.
Comment 6 Richard Morris 2014-10-07 11:05:35 UTC
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.
Comment 7 James Forrester 2014-10-09 16:37:21 UTC
(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?
Comment 8 Gerrit Notification Bot 2014-10-09 22:18:59 UTC
Change 165908 had a related patch set uploaded by Mooeypoo:
Add <noinclude> tags to new <templatedata> strings

https://gerrit.wikimedia.org/r/165908
Comment 9 Gerrit Notification Bot 2014-10-10 00:01:43 UTC
Change 165908 merged by jenkins-bot:
Add <noinclude> tags to new <templatedata> strings

https://gerrit.wikimedia.org/r/165908
Comment 11 James Forrester 2014-10-23 16:20:07 UTC
(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…

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links