Jump to content

Template talk:Documentation/Archive 6

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1Archive 4Archive 5Archive 6Archive 7Archive 8Archive 10


/Print

{{editprotected}}

Could you add a message such as:

A print version of this template exists at /Print. If you make a change to this template, please update the print version as well.

at the top of the documentation page. (Only if the /Print page exists that is. Also check for /print as well.) Thanks. Headbomb {ταλκκοντριβς – WP Physics} 19:28, 19 February 2010 (UTC)

Is there any discussion about this? — Martin (MSGJ · talk) 19:53, 19 February 2010 (UTC)
Disabled the request, because it's still under discussion, and this page is watched plenty anyways. I think it is a good idea, though I would care to point out that most templates don't need a /Print version (use of the noprint class is enough usually), and that it might be a bit confusing for people to have a 'create' link. Also, it's a bit extra confusing, since /Print is only for bookprint and PDF rendering, and not for webpage printing. For more information on this /Print, see Help:Books/for_experts#Fixing_problems. —TheDJ (talkcontribs) 21:15, 19 February 2010 (UTC)
Yes that's why it should display only if the page exists, as noted above. Headbomb {ταλκκοντριβς – WP Physics} 22:33, 19 February 2010 (UTC)
I weren't aware of /Print subpages. But now I have read up on it and I ran some tests. I just used it from my non-admin account to modify the Main page... /Print subpages are a gaping security hole. And there are a number of other problems with /Print subpages. We already have better methods to achieve the same thing so /Print subpages are not needed.
So I have blocked the creation and editing of /Print subpages here on the English Wikipedia. I'll write a more detailed description of the problem somewhere and link to it from here.
--David Göthberg (talk) 07:16, 20 February 2010 (UTC)
You've unilaterally disabled a feature on ALL mediawiki projects without even understanding what /Print templates do. These are NOT a security issue, for the simply reason that /Print templates are ONLY used when rendering books or individual articles (aka in the downloadable PDFs and ODTs). I could create {{citation needed/print}}, which contained "Jim is a nudist" and there is absolutely nothing that would be broken anywhere on Wikipedia, including the main page assuming there was a {{citation needed}} somewhere on it.
The ability to overide templates to create print-specific versions has been around for as long as books have, and on several Mediawiki projects, and it never caused any issue. There's no reason to disable this feature out of disproportionate fears of vandalism. Several more sensible solutions are possible, amongst them having bots apply the same level of protection to /Print pages than to the base page, semiprotect /Print pages by default, or simply leave things as they are now since there's no actual problem, and this should all be decided on a per project basis. Vandalism of the /Print pages isn't any more special than the vandalism of any other pages. (And I will note that if German Wikipedians can live with this "risk", that's their call, and certainly not the English Wikipedian's).
And lastly, {{hide in print}} and the like only gets you so far. Printed material have different considerations than online material. What looks good online does not necessarily look good in print, and /Print templates allows template writers to make sure that things looks good in print too. For example, the little periodic table present in {{Infobox hydrogen}} (which calls {{Elementbox}}) will destroy books (and no, it cannot be fixed using any other method other than a /Print, at least not straightforwardly), hence a /Print version (at {{Elementbox/Print}}) was created, and now Book:Hydrogen is not broken (and all the other books on elements).
/Print templates are no different than any other templates as far as risks to the encyclopedia goes, on either vandalism or security issues. Please undo the blacklisting. Headbomb {ταλκκοντριβς – WP Physics} 07:50, 20 February 2010 (UTC)
No comment on the merit of /Print subpages because I have never encountered these before, but I must say that this is an major decision to take with any discussion at all. So I will probably revert those changes while discussion continues. (If there is a security hole then it has been open some time already and so is not urgent.) I would like to know more about these pages (when they first supported, any other discussions about it, technical details, etc.) because I am still in the dark after reading the links supplied. — Martin (MSGJ · talk) 08:47, 20 February 2010 (UTC)
Basicaly, if a template looks like crap in print ("create a PDF" links from the sidebar, or in Books), you can create a version of that template specifically designed for print, which overrides the normal template (but only in print, on wikipedia, nothing is changed). For example, a template like {{ref}} would not display as [ref a], but rather as something like [[#endnote_{{{1}}}|ref a]] "http://www.url.com/" (I don't remember exactly what it looked like, but the point is that is didn't look like [ref a]). And so {{ref/Print}} was created, which looks as intended in print.
As far as the exact date or centralized discussions, I couldn't tell you, but books and these /Print templates have been around for more than a year now. I suppose you could find lots of relevant information at http://code.pediapress.com/wiki/wiki , but really everything that is relevant is detailed here and at Help:Books/for experts. Headbomb {ταλκκοντριβς – WP Physics} 09:10, 20 February 2010 (UTC)
(Edit conflict)
No, I didn't block the feature on all Wikipedias. I only blocked it here on the English Wikipedia. And as I said, today I used that "feature" to modify the main page, only using my non-admin account. Sure, the modification was only visible when using the "Download as PDF" and "Create a book" feature in the "print/export" menu, but that is bad enough. And I of course had to block that security hole before discussing it here in the open.
MSGJ: Now that this security hole has been discussed openly I strongly advice against opening it up again. We currently only have some /Print subpages, users that need to update them can do {{editprotected}} requests on their talkpages.

{{Editprotected}}

NO, they cannot. So I place this template on this Talk page. In the argument given by editor David Göthberg, the faulty logic lies in the fact that all of Wikipedia is, itself, a similar "security problem". While it makes no sense to me to block the editing of /Print pages just because there might be a future security problem, that's not why I'm here in blatant breach of policy. (Sorry about that.) I'm here because I cannot place {{Editprotected}} on the {{Elementbox/Print}} Talk page, because that also has been blocked from editing. (I tried to create the Talk page, but got the same NOCANDO message that I got when I tried to MOVE the /Print subpage.)

Another editor moved {{Elementbox}} to {{Infobox element}}, but did not move most of the associated subpages and other pages as depicted here and here. I am in the process of moving the associated pages, but could not move the /Print subpage due to the present blockage. I agree with editor Headbomb— this type of editorial blockage is unconscionable, and so should be reversed immediately. Barring that, could one of you respected admins please move {{Elementbox/Print}} to {{Infobox element/Print}}? Thank you very much in advance!
 —  Paine (Ellsworth's Climax07:54, 3 July 2010 (UTC)

PS. Does anybody know of a bot that will move all of the remaining associated pages as depicted here, here and here?
PPS. I see that the above suggested MOVE has been done (Thank you, Martin!). I suppose I should have also suggested that the Rcat, {{R from move}}, be placed on the newly created Redirect page in the following fashion:
#REDIRECT [[Template:Infobox element/Print]]{{R from move}}
10Q! —  Paine (Ellsworth's Climax08:50, 3 July 2010 (UTC)
Not sure why you're posted this in the middle of the old thread ... but I have made the move you requested. My original thoughts on this matched yours at the time - that the risk was not significant enough to warrant the protection. We can remove it if there is consensus that it is not needed. — Martin (MSGJ · talk) 08:44, 3 July 2010 (UTC)
Yes, there was probably a better way to do that, but David had said that we could use the Editprotect template on the individual /Print Talk pages, and evidently, this is not true. As for consensus, there's you, me, Headbomb and I think possibly also TheDJ, who think this is an unnecessary blockage. I wonder where is David on this now?
 —  Paine (Ellsworth's Climax08:56, 3 July 2010 (UTC)
PS. There is a wiki-sick-leave notice on his Talk page.
Wikipedia pages are edited and watched by our editors here on Wikipedia, not later on paper. The /Print subpages allow a vandal to change the content of any template, even high-risk templates and templates used on the main page. And the creation and editing of /Print subpages will not be noticed by the people editing those templates, since they are not watching the /Print subpages, and it will not be noticed by the people working with the articles since they are seeing the online version.
So vandalism through /Print subpages is a very different thing than vandalism to normal pages and templates, since it doesn't trigger any watchlists and it circumvents page protection.
You suggest having bots that replicate the protection from main templates down to /Print subpages. But that wouldn't work for a whole number of technical reasons, which would take some pages to explain so I'll skip that explanation for now.
As a template programmer I don't need the /Print subpages. If a template needs to have different appearance online and when printing I can simply do like this:
{{hide in print
| <!--Code for the online version-->
}}{{only in print
| <!--Code for the PDF and book version-->
}}<noinclude>

{{documentation}}
</noinclude>
Of course, that is slightly clumsy, so I suggest we make a single {{print version}} template that returns "true" when printing, and returns an empty string when online. (I can easily code that one up.) It can be used like this:
{{#if: {{print version}} 
| <!--Code for the PDF and book version-->
| <!--Code for the online version-->
}}<noinclude>

{{documentation}}
</noinclude>
Or we could make the {{print version}} template take the two code versions as parameters, like this:
{{print version
| print = <!--Code for the PDF and book version-->
| web = <!--Code for the online version-->
}}<noinclude>

{{documentation}}
</noinclude>
Having both versions of the code on the same page makes it much more likely that template programmers will update both versions. While if /Print subpages are used I as a template programmer might not even be aware of that a template has a separate print version.
If a template is large and complex then it is up to the template programmer to split the template to one or more subpages and call those subpages from within the above code. But note that that can't be used by vandals, since the people watching the template will see when the code is changed to use subpages. And if the template is protected a vandal can't even split the template into subpages.
So really, /Print subpages are not needed, and they are a gaping security hole.
--David Göthberg (talk) 09:06, 20 February 2010 (UTC)
It's easy to monitor the /Print pages. Lump 'em all in a category then create a watchlist for them. Again, nothing that warrants disabling the easiest way and most manageable way to fix problems. Headbomb {ταλκκοντριβς – WP Physics} 09:17, 20 February 2010 (UTC)
Headbomb: The main problem is the /Print pages that haven't been created yet, that thus aren't watched by anyone. How do you suggest we categorize pages that haven't even been created yet?
--David Göthberg (talk) 09:23, 20 February 2010 (UTC)
Bots can do that pretty easily. Headbomb {ταλκκοντριβς – WP Physics} 09:25, 20 February 2010 (UTC)
No, it cannot. This is an issue that needs to be fixed. —TheDJ (talkcontribs) 12:30, 20 February 2010 (UTC)
Yes they can. 14:40, 20 February 2010 (UTC)
Headbomb: So a vandal creates a /Print page with a penis picture for some high-risk template that is visible on a million pages. Then some time later a bot is supposed to come along and add a category to that /Print page? And how exactly do you suggest that the bot should make it so some human then gets that page onto his watchlist? And even if that was technically possible, that would be after the rude picture was added, thus the users who get to watch those pages would not notice the edit, since it is already far down on their watchlist.
I have already shown a better solution above, and it solves all four problems:
1: Getting template coders to update both the online and print version of the code.
2: Making protection affect both versions.
3: Making watchers watch both versions.
4: Making watchers note if a print version is added to a template that didn't have a print version.
--David Göthberg (talk) 09:51, 20 February 2010 (UTC)
It's not a good solution, because it creates humongous templates, which becomes extremely annoying to test (screwing up /Print templates has so little impact that you don't have to bother with sandboxes and test articles while you're testing a fix), and even more annoying to maintain, especially when templates like {{citation}} is concerned. The creation of a bogus /Print template is no more difficult to catch than the creation of a random Jim is a nudist HAHAAHAHA~!!!1 page, and that page wouldn't show on anyone's watchlist if created either.
The bot solution is simple. Whenever a /Print page is created, a bot tags it with something like Category:/Print templates, which can then be used to form a community watchlist, similar to how we can monitor the creation of User:Books through Category:Wikipedia books (user books). We could also make it so that the /Print templates inherit the same protection as their parent, or even semi-protect them by default. Full protection however, is ridiculous, because it will make those who'd help and fix things say "Ah fuck it, that's too much trouble".
Whatever vandalism is done on /Print templates is no different from the random vandalism of any low-traffic pages. We don't fully protect the Paul Corkum out of fear "someone might insert a penis picture, and it could go unreverted for a while".
This never has been a problem in over a year, both here and in all the other wikis that support books, and the others even allows unregistered users to create /Print templates. Headbomb {ταλκκοντριβς – WP Physics} 15:08, 20 February 2010 (UTC)
Your examples don't compare to the damage that can be done with the /Print subpages. Before I blocked the /Print subpages any user could create a /Print subpage for a template used on a million pages, or for templates used on the main page and other such high-visibility pages.
That it hasn't happened yet is not an argument, since until now the problem wasn't known. But now that we are openly discussing this security hole it is just a question of time until the vandals learn about it. And even if we would have kept quiet about it, when /Print subpages would have come to wider use sooner or later more people and vandals would discover the hole.
A bot could only tag new subpages after the fact, after a million pages have been vandalised. And who do you suggest should code up that bot, and see to that it is always running, forever, and watch all the /Print subpages? You?
If a template is big and complex, then it is up to the template programmer to split it into subpages, just like we already do with complex templates. It shouldn't be up to any vandal to add those subpages.
--David Göthberg (talk) 21:22, 20 February 2010 (UTC)
Not true, not anyone can create a /Print page, you need to be autoconfirmed, just like for any other pages. Creating a /Print page for vandalism purposes is no more harmful, or harder to detect than someone creating Relations between Saudi Arabia and Malawi, and plastering penis pictures all over it. The "problem" was not known, because there is no "problem" to speak of, and there's just about 20 million better ways to defend against a non-problem than pissing off template maintainers by doubling the size of complex templates, and disabling the easiest way to maintain them. Headbomb {ταλκκοντριβς – WP Physics} 05:05, 21 February 2010 (UTC)

After discussing this with demon aka innocentkiller, i have sent Tim Starling an email requesting to look into this. It's not really a critical issue, but something that needs proper review. —TheDJ (talkcontribs) 19:19, 20 February 2010 (UTC)

TheDJ: Thanks. --David Göthberg (talk) 21:22, 20 February 2010 (UTC)

In the meantime

In the meantime, could someone add that link in the documentation? Because whatever the outcome, these still exist for the moment, and they should be linked. Headbomb {ταλκκοντριβς – WP Physics} 23:07, 25 February 2010 (UTC)
 Done. I've also populated Category:Templates with print versions. — Martin (MSGJ · talk) 15:29, 26 February 2010 (UTC)
Excellent! I've made that bot request. Headbomb {ταλκκοντριβς – WP Physics} 18:08, 26 February 2010 (UTC)
These seem to appear at the bottom of the page. I think it would be best to place them right at the top (above the TOC). Opinions? Headbomb {ταλκκοντριβς – WP Physics} 06:18, 28 February 2010 (UTC)
The link should be with the other technical/editor-related material which it was decided, per the discusion above (#Documentation/links), to place below the user-related content. — Martin (MSGJ · talk) 09:00, 28 February 2010 (UTC)
I added editnotices to make this even more clear. Not sure if we still need the note in the Documentation now. —TheDJ (talkcontribs) 21:55, 22 March 2010 (UTC)
Nice. I don't think there is any harm leaving it in the documentation as well. It also populates the category which might be useful. — Martin (MSGJ · talk) 23:16, 22 March 2010 (UTC)

I notice that the template doesn't check for a lowercase version of "/print". These should be considered as well, with a message prompting people to move them at /Print (it's case sensitive). Headbomb {talk / contribs / physics / books} 05:14, 15 April 2010 (UTC)

We don't check for /Doc either do we ? Ifexists check are rather expensive calls, I'd rather avoid them. How common is this problem ? —TheDJ (talkcontribs) 12:23, 15 April 2010 (UTC)
Well, we won't know until we try it. I mostly want a category such as Category:/Print template which are located at /print but should be moved to /Print because that's how things should be if you want them to work (although with perhaps a better name). This could be a temporary one time thing if it's not a common thing, since the creation of either /print or /Print is limited to account creators. Headbomb {talk / contribs / physics / books} 18:01, 15 April 2010 (UTC)
Considering the low amount of pages that currently have a /Print page, and the fact that they all seem to show up in a search, i think it is safe to assume that it is highly unlikely that there are any such pages. —TheDJ (talkcontribs) 22:35, 18 April 2010 (UTC)

Reduced protection

Would it be possible to reduce the protection on /Print subpages? As it is now, even the Talk pages are blocked, and therefore, as I indicated above, {{Editprotected}} cannot even be added to /Print Talk pages if an editor would like to ask an administrator to make an edit. At the very least, /Print Talk pages should be unblocked, and preferably, established editors should again be allowed to edit /Print subpages under semi-protection. Please make this change as soon as possible.
 —  Paine (Ellsworth's Climax05:46, 6 July 2010 (UTC)

I would support this. However I don't understand the syntax enough to be able to make the edit myself. The current statement is the following. — Martin (MSGJ · talk) 07:49, 6 July 2010 (UTC)
 .*\/Print <noedit|errmsg=titleblacklist-custom-print>
At first glance, there doesn't seem to be a way to only unblock the Talk pages. Can the command be commented out?
 —  Paine (Ellsworth's Climax08:55, 6 July 2010 (UTC)
PS. In the meantime, the Template:Elementbox/Print Redirect still needs an Rcat added in the following manner:
#REDIRECT [[Template:Infobox element/Print]]{{R from move}}
Thank you!
Done. I'd just wish those pediapress folks would fix their extension for this problem, I mean Tim already told them how to do it. I guess something alla...
 .*(?!(talk|Talk))\/Print <noedit|errmsg=titleblacklist-custom-print>
might work, but i'll have to test it on test.wiki.x.io —TheDJ (talkcontribs) 11:35, 6 July 2010 (UTC)
I think restricting the protection to the template namespace would surely be adaquate? — Martin (MSGJ · talk) 12:07, 6 July 2010 (UTC)
Ha, you'd think, but this /print trick works for all namespaces, which makes it such a dangerous thing. Anyway, tested my regexp, and it isn't working. I'm not good enough with this. Will ask a vandal fighter or something. —TheDJ (talkcontribs) 12:33, 6 July 2010 (UTC)
According to AWBs master Reedy, it is an impossible match (except for in JAVA). i'll guess i'll have to whine to pediapress again about this bug. —TheDJ (talkcontribs) 12:41, 6 July 2010 (UTC)
We can at least stick in the "autoconfirmed" to reduce the protection. — Martin (MSGJ · talk) 12:44, 6 July 2010 (UTC)
I don't think that is a good idea. The problem should simply be solved. —TheDJ (talkcontribs) 13:36, 6 July 2010 (UTC)
And how long might that take? The only reason I ask is that if you cannot lift the block on the Talk pages, then where are editors supposed to place the Editprotected template? And if this is such a low priority problem, as I think was indicated in the discussions above, then it could be a very long time before established editors can once again be able to edit /Print pages when they edit their associated Templates, no? So one hundred edits later, the block is lifted, and then 100 edits will need to be added to the /Print page? For how many templates?
 —  Paine (Ellsworth's Climax15:40, 6 July 2010 (UTC)
You can use editprotected where ever you want. On your own talk page for instance, or the talk page of the parent documentation page. —TheDJ (talkcontribs) 16:33, 6 July 2010 (UTC)
You just want it to match all non-talk pages, right? (?!(?:Talk:|(?:User|Wikipedia|File|MediaWiki|Template|Help|Category|Portal|Book) talk:)).*\/Print should match that just fine. You'll always need to enumerate all namespaces since something like Plain Talk: Lessons from a Business Maverick is a valid article. Amalthea 16:18, 6 July 2010 (UTC)
I'll try this out. —TheDJ (talkcontribs) 16:33, 6 July 2010 (UTC)
Great work AzaToth. That does the trick. Now changed. —TheDJ (talkcontribs) 16:55, 6 July 2010 (UTC)
Heh, I may hack Twinkle from time to time, but I'm not AzaToth.:) Amalthea 17:25, 6 July 2010 (UTC)

Learn something new everyday. Thanks, ya'll !
 —  Paine (Ellsworth's Climax11:55, 7 July 2010 (UTC)

PS. Almost forgot... there's still that one more little challenge regarding the edits that are made to the main templates that do not get made to the /Print templates. For whatever reason, maybe editors might think, "Oh this is too much trouble," so the main template edits pile up while the /Print pages get further and further behind. This discussion opened in February, and how will the backlog be handled? And should we allow this situation to continue? 17:13, 7 July 2010 (UTC)

Template documentation box width issue on Internet Explorer

There is an ongoing discussion regarding a discrepancy (confirmed on IE7 and IE8) in the width of the green template documentation boxes on certain templates. Please see Wikipedia:Village pump (technical)/Archive 132#Template documentation. Comments and suggestions are most welcome. Thank you, -- Black Falcon (talk) 06:06, 28 February 2010 (UTC)

The two examples used in that discussion contain right-floating boxes in the documentation. So this is the same browser bug as described above in section Problem with right-aligned images. I'll explain how to fix it there. Please continue the discussion there.
--David Göthberg (talk) 06:48, 3 March 2010 (UTC)