Template talk:Always substitute

Latest comment: 1 year ago by Shushugah in topic Confusing wording

Warn/prevent substitution for unknown parameters?Edit

This template needs to come with prominent warnings that using it on a template which is invoked with unknown parameters will cause loss of information, including non-trivial amounts of encyclopedic information lost in the last couple of years (see Template talk:Lien web).

(Background:

I still think the underlying issue should be fixed; most (but not, apparently, all) current subst-only templates simply shouldn't be substed if there are unknown parameters. One way of achieving this would be to use something like {{Subst if possible}} on those template pages, and to modify AnomieBOT to check, for those templates only, that unknown parameters aren't used.

For an example of what's currently happening, look at this diff. The problem is that since it was a substitution that happened, there's no way for template authors to fix the problem retroactively: someone is going to have to go through the edits and find those where information was lost (this part is easy to automate), then go to the current revision of the article and perform the necessary corrections (this part is usually very hard).

Everyone keeps telling me "this is not a bot issue", but it's easy to fix by modifying the bot (and, obviously, adjusting Wikipedia policy to make clear that such a modification is legal and required), and impossible to fix for the future without doing so, so I remain unconvinced.)

Anyway, since the underlying issue doesn't look like people are interested in fixing it, please at least warn users of this template that they shouldn't use it unless they've verified that all parameters they are likely to be invoked with, particularly in the case of templates that simulate foreign Wikipedias' reference templates, are actually handled.

Eelworm (talk) 10:37, 17 October 2020 (UTC)Reply[reply]

Abuse of this templateEdit

I noticed a critical flaw with this template. The template not only advises users to subst this template, but also can control whether the template should be substed by a bot. If placed on documentation pages of templates that are transcluded on many pages, the template could have the potential to cause substantial load on the servers. These templates are almost always protected, but by the open nature of this wiki, most of the doc pages can be edited by anyone. This means anybody could cause a template to be substed when it is not necessary, perhaps even breaking wikicode. Templates that use the unsubst module may be perpetually substed. Users may also categorize templates into Category:Wikipedia templates to be automatically substituted manually. I suggest removing the code that causes the category addition to make it harder for the template to be used maliciously. I don't know if protecting the category would help. I hope I didn't violate WP:BEAN. --JsfasdF252 (talk) 03:34, 22 December 2020 (UTC) updated 03:38, 22 December 2020 (UTC)Reply[reply]

The bot refuses to substitute templates with many transclusions, for this very reason. – Jonesey95 (talk) 07:06, 22 December 2020 (UTC)Reply[reply]
@Jonesey95:Exactly how many template transclusions (or pages the template is transcluded on) is required to prevent the bot from substituting it? Also, does the bot refuse to substitute any and all templates which use Module:Unsubst? Why doesn't the category description mention this? JsfasdF252 (talk) 15:15, 22 December 2020 (UTC)Reply[reply]
See this example. – Jonesey95 (talk) 15:31, 22 December 2020 (UTC)Reply[reply]

Confusing wordingEdit

The template itself displaying "should always be substituted" and then documentation saying the template itself should never be substituted is awkward phrasing. I will think more how to better word it, but I suspect the ambiguous reference to "Template" could be improved, or even provided with an example to make it clearer. ~ 🦝 Shushugah (he/him • talk) 10:11, 10 December 2021 (UTC)Reply[reply]