Category talk:Templates needing substitution checking
Latest comment: 2 days ago by Mikeblas in topic Why?
This is the talk page for discussing improvements to the Templates needing substitution checking category. |
|
This category does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||||||
|
Why?
editWhy would a template need "substitution checking"?--Mr. Guye (talk) 23:21, 17 April 2017 (UTC)
- WP:Substitution doesn't explain the purpose of this category or how it's usually added to templates. It's a bit technical. First see {{Substcheck}}. The category is often added by {{Fix}} or {{Fix-span}}. {{Fix}} should be called with the parameter
| subst = <includeonly>{{subst:substcheck}}</includeonly>
to enable the substitution checking described in {{Substcheck}}. {{Fix}} detects if the parameter is missing and adds the category in this case. So if you see Category:Templates needing substitution checking on a template then it's often because it calls {{Fix}} without thesubst
parameter. The call may be via another used template or module and not directly in the source so it may be difficult to get rid of the category. However, on most templates I don't think it's a problem to have the category. PrimeHunter (talk) 10:34, 18 April 2017 (UTC)- This category seems really frustrating -- it's not particularly actionable, and trying to sort out the problem is arduous. Is it just another case where sloppy edits are left around for other people to clean up?
- Can we work through an example? {{Beijing weatherbox}} is in the Category:Templates needing substitution checking category. {{Beijing weatherbox}} just invokes {{Weather box}}. (Note that the inconsistent naming is accurate.) {{Weather box}} is not in the substitution checking category, so it must be some parameter problem {{Beijing weatherbox}} uses (or not) when invoking {{Weather box}}.
- The documentation for {{Substcheck}} is really sketchy and incomplete. It implies (but does not say) that LUA modules (like {{Weather box}}) will use
.isSubsting()
to detect substitution, and then invoke {{Substcheck}} if they don't like it. - But I don't see any calls to
.isSubsting()
or an invocation of {{Substcheck}} or an addition of a category in the {{Weather box}} code. - So why does {{Beijing weatherbox}} add itself to Category:Templates needing substitution checking? Does it come from the use of {{Cite web}} in {{Beijing weatherbox}}? Some other template it uses, like {{efn}} or {{dead link}}? It seems like {{efn}} invokes {{fix-span}}, but I can't specifically find that invocation.
- How is this meant to be debugged? -- mikeblas (talk) 22:50, 24 November 2024 (UTC)