Module talk:Parameter validation
Appearance
Module improvements
Following up from Template_talk:Infobox_station#Parameter_validation:
- Userspace: No, perhaps not. Depends entirely on the template, but for infoboxes I suppose that may be correct. Editors may use a infobox on their main userpage though. Should that be categorised, if they're using invalid params? The module has flexibility to allow templates to do as they choose, so it's mostly a question of what's the sane default.
- However, it is worth noting that bots may use these categories for maintenance work. Bots can be approved for non-articlespace work. And it's generally more performant to have them look over a precise category of params, than go through all transclusions or have to setup temporary cats for each run.
- Hmm, yes, that would be a good idea. I will see what I can do.
- The config page doesn't currently have knowledge of the number of entries in the list, which lies in the module. We can do "unknown parameter(s)"?
ProcrastinatingReader (talk) 23:18, 22 October 2020 (UTC)
- The standard Module:Check for unknown parameters allows for the use of {{main other}} to limit application of categories, while always showing the error message in preview mode. That way, a user-space or draft-space editor could see the red error message and fix their draft, but regular editors would not be bothered by user/draft-space pages cluttering up a maintenance category for actual encyclopedia articles. This module should provide that same capability in some form. If editors of a specific template want to expand categorization to other namespaces, they can do so, and then bots can do their work. The choice should be available to template editors.
- OK to trying to show both duplicated parameters. Something like "duplicate parameters: image/imagename, caption/image_caption" should work (that's two sets of duplicates in one message, to be clear).
- "unknown parameter(s)"/"deprecated parameter(s)" is a reasonable workaround. "duplicate parameters" will always be plural, since there are at least two. – Jonesey95 (talk) 23:35, 22 October 2020 (UTC)
- 1) Set {{main other}} as default for categorisation. Template editors can create custom configs for use and use them via parameter 3. This is documented in the module config ("JSON-encoded string" / "Template:PV default options" part). It would seemingly be quite rare for infoboxes to deviate from the default, though.
- 3) Done