Module talk:Check for clobbered parameters
Appearance
| This module does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
| ||||||||
Preview warning and hatnotes moving to templatestyles
[edit]Page watchers may be interested in MediaWiki talk:Common.css § Preview warning and hatnotes moving to TemplateStyles Izno (talk) 00:22, 29 April 2021 (UTC)
Preview?
[edit]Any chance of adding a {{{preview}}} option, in the same way as Module:Check for unknown parameters. Alternatively, add a link to the template being checked to the error message shown in preview mode. See the use made for preview in the {{Infobox website}} template — GhostInTheMachine talk to me 14:12, 23 October 2023 (UTC)
Rename
[edit]Given that the categories and error messages all describe "conflicting" parameters, does it make sense to rename this module Module:Check for conflicting parameters? Zackmann (Talk to me/What I been doing) 19:38, 15 December 2025 (UTC)
- clobber has a very specific meaning that kinda fits this module, but even the module's documentation created by the original module's author has called it "conflicting parameters" since the beginning. The tracking category tree is under Category:Conflicting parameters with most of it under Category:Infoboxes with conflicting parameters (116).
- So we have:
- Module:Check for unknown parameters and Category:Unknown parameters – consistent.
- Module:Check for deprecated parameters and Category:Deprecated parameters. A subcategory Anime and manga articles using obsolete and incorrect infobox parameters calls them "obsolete", but otherwise the used terminology is fairly consistent.
- Module:Check for clobbered parameters + Category:Conflicting parameters
- Based on this, I support renaming to Module:Check for conflicting parameters.
- Side note: we also have Category:Articles using duplicate arguments in template calls and Category:Pages using duplicate arguments in template calls. Both are defined by MediaWiki:Duplicate-args-category, but they are for exact duplicates, not for the stuff this module checks like
{{{founders|(example 1 in /doc). —andrybak (talk) 20:33, 15 December 2025 (UTC){{{founder|}}}}}}- To be clear, I totally understand why it was called clobbered initially. I just think it would be helpful to keep consistent. Can the Module namespace support redirects? I've never tried that before... If you
{{#invoke:check for clobbered parameters|check}}after a move is decided upon, would that still work or will we have to change every call to this? Zackmann (Talk to me/What I been doing) 20:44, 15 December 2025 (UTC)- MediaWiki automatically creates Module redirects, and they work as you'd expect. Example: Module:Location map/data/Dili. —andrybak (talk) 21:02, 15 December 2025 (UTC)
- Stellar! Thanks. Zackmann (Talk to me/What I been doing) 21:52, 15 December 2025 (UTC)
- MediaWiki automatically creates Module redirects, and they work as you'd expect. Example: Module:Location map/data/Dili. —andrybak (talk) 21:02, 15 December 2025 (UTC)
Rename but also make sure to replace the redirect.This module, unlike Check for unknown parameters, should be temporarily until the parameters can be replaced. It would be good to go over every usage and see if the job was completed and remove the module or update the link. Category:Infoboxes with conflicting parameters has too many empty categories. Gonnym (talk) 09:55, 17 December 2025 (UTC)- I don't think such parameters are meant to be removed from the wikitext of the templates. As far as I understand, these are regular maintenance categories, not aids in template refactoring. E.g. if someone adds
|founder=by accident to a transclusion of a template not realizing that|founders=is already present. The corresponding categories are meant to be empty most of the time. In the particular example (Module:Check for clobbered parameters#Example 1), the two different parameters have slightly different effect: the plural parameter turns the label in the infobox into plural, which avoids having unsightly "Founder(s)" as the label. - Or am I misunderstanding something? —andrybak (talk) 12:54, 17 December 2025 (UTC)
- Andry is correct. It is Category:Deprecated parameters that is meant to be short lived... Zackmann (Talk to me/What I been doing) 15:30, 17 December 2025 (UTC)
- @Gonnym: there are some cases where the conflicting params can/should be cleaned up. For example if you have
{{{website}}}conflicting with{{{homepage}}}you could argue for cleaning up one but remember, the category being empty doesn't mean you can remove one of those parameters... There may be many uses of both. The category only populates if a transclusion uses both parameters. You would need to use Module:Check for deprecated parameters to deprecate one of those parameters and then remove all uses of it, converting them to use the other. For the record, I am doing that on Infoboxes that have lots of aliases. (See for example my current work on {{Infobox venue}} -> Category:Pages using infobox venue with deprecated parameters (14,398)). - There are also cases where you need to keep the category for conflicting params that cannot be deprecated. For example, on {{Infobox organization}},
{{{formation}}},{{{established}}},{{{founded_date}}}&{{{founded}}}all conflict. But depending on which one you use, the label displays differently. This is not a case where you can deprecate 3 of them to end up with only 1 parameter accepted. (Though I guess you could deprecate{{{founded_date}}}in favor of{{{founded}}}). Hope that makes sense...
Zackmann (Talk to me/What I been doing) 16:08, 17 December 2025 (UTC)
- If the only reason for this module is to do what you guys say, then this module and category system is completely pointless. If the template doesn't care if you write
|founder=or|founders=then leave it alone. If, however, you want cleaner template code and want to get rid of the plural parameters (which makes complete sense), then such a category makes sense. Gonnym (talk) 16:55, 17 December 2025 (UTC)- I'm looking at Template:Infobox organization. The parameter paris in the like of
full_name; full nameare not conflicting. If they aren't meant to be replaced and one of them later removed, then everything here is wrong. The proposed name of the module, the tracking category, and even the tracking itself. Gonnym (talk) 16:58, 17 December 2025 (UTC)- As of Special:Diff/1328040937, in Template:Infobox organization parameters
full_name(with an underscore) andfull name(with a space) are conflicting. The wikitext for their usage in the infobox is:{{#if:{{{full_name|}}}{{{full name|}}}|<div [...]>{{if empty|{{{full_name|}}}|{{{full name|}}}}}</div>}}. Per Template:If empty/doc, parameterfull_name"wins", it "clobbers" parameterfull nameif they happened to be both used at the same time, e.g.{{Infobox organization|full_name=foo|full name=bar}}. - Unlike earlier example with founder/founders, Template:Infobox organization doesn't care which of the two parameters is used, but it does care if both of them are used at the same time. The tracking helps fix such cases. —andrybak (talk) 17:12, 17 December 2025 (UTC)
- @Gonnym: I think you are misunderstanding how this code works... Remember, they are only conflicting (and only a trigger an error & tracking category) when BOTH parameters are used (even if one is blank). This is particularly useful and necessary when you are using a wrapper. Look at {{Infobox social media personality}} for example where
pseudonymis an alias ofother_names. If you use one OR the other, there is no problem. But if both are supplied, even if one is blank, then you get weird behavior. I'm not even sure off the top of my head which would "win" but without this warning, you could be supplying a param that is not displaying and have no clue why it is not displaying. - Now using the example andrybak listed above with {{Infobox organization}} I do agree that the ultimate goal should be to eliminate
|full name=in favor of|full_name=(See MOS:INFOBOXNAME) but as someone who has done these cleanups many times, they are labor intensive and time consuming. When warranted (like I'm currently doing with {{Infobox venue}}) they can certainly be done. But in the mean time, the conflicting param check is needed to ensure errors don't crop up. - Final point... FWIW I am less concerned with the categories. There may be people who patrol these categories... I'm more a fan of patrolling CAT:UNKNOWN myself... The much more significant thing here (IMHO) is the preview warning that helps explain why information is not displaying correctly. Zackmann (Talk to me/What I been doing) 20:08, 17 December 2025 (UTC)
- @Gonnym: I think you are misunderstanding how this code works... Remember, they are only conflicting (and only a trigger an error & tracking category) when BOTH parameters are used (even if one is blank). This is particularly useful and necessary when you are using a wrapper. Look at {{Infobox social media personality}} for example where
- As of Special:Diff/1328040937, in Template:Infobox organization parameters
- I'm looking at Template:Infobox organization. The parameter paris in the like of
- If the only reason for this module is to do what you guys say, then this module and category system is completely pointless. If the template doesn't care if you write
- @Gonnym: there are some cases where the conflicting params can/should be cleaned up. For example if you have
- Andry is correct. It is Category:Deprecated parameters that is meant to be short lived... Zackmann (Talk to me/What I been doing) 15:30, 17 December 2025 (UTC)
- I don't think such parameters are meant to be removed from the wikitext of the templates. As far as I understand, these are regular maintenance categories, not aids in template refactoring. E.g. if someone adds
- To be clear, I totally understand why it was called clobbered initially. I just think it would be helpful to keep consistent. Can the Module namespace support redirects? I've never tried that before... If you