Module talk:Check for deprecated parameters
- Put new text under old text. Click here to start a new topic.
- New to Wikipedia? Welcome! Learn to edit; get help.
- Assume good faith
- Be polite and avoid personal attacks
- Be welcoming to newcomers
- Seek dispute resolution if needed
It is of interest to the following WikiProjects:
Review request
[edit ]@Hike395, Jonesey95, and Frietjes: as some of the best template editors I know, I'd love to get your feedback on this module. I've been doing a lot of work cleaning up Deprecated parameters and one of the ongoing frustrations has been figuring out which parameter is deprecated. So I took the lead from Frietjes' awesome Module:Check for unknown parameters. What this does is take a list of parameters including their old value and what they should be replaced with. If the module is implemented on a template, when that template is transcluded with deprecated parameters it will put the page in a given category. Additionally, when the page is previewed it will display Warning: Page using <template name> with deprecated parameter "old_param". replace with "new_param" (this message is shown only in preview). I have a very rudimentary testcase setup at User:Zackmann08/deprecated page so that you can see what it does. To avoid redlinked categories, I'm passing in [[:Category:Pages using user:Zackmann08/deprecated template with deprecated parameters|_VALUE_{{PAGENAME}}]] so it will actually render a link. Anyway, no rush at all, but would love any feedback you can provide! --Zackmann (Talk to me /What I been doing ) 20:07, 30 November 2018 (UTC) [reply ]
- Update: testing with {{Infobox building }} right now... --Zackmann (Talk to me /What I been doing ) 21:22, 1 December 2018 (UTC) [reply ]
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) [reply ]
Syntax
[edit ]What if there is no new_param which is replacing old_param, i.e. the parameter is no longer supported? — Martin (MSGJ · talk) 17:43, 5 December 2023 (UTC) [reply ]
Another review
[edit ]@Hike395, Jonesey95, and Frietjes: so almost 7 years later... Another review request. In the sandbox I have mocked up a hopeful improvement which takes a CSV set of param(s) to simply be removed. I.E. there is no replacement param, the param just needs to go.
Would be called like so:
{{#invoke:Check for deprecated parameters/sandbox|check
| category = [[Category:Deprecated params]]
| _remove = removeme, remove2, remove3, remove 4, remove me 5
| old_param1 = new_param1
}}
And would display a preview message saying Preview warning: Page using TEMPLATE_NAME with deprecated parameter "removeme". It should be removed.
I think it is good to go, but would definitely like a second or third set of eyes on it.
Here is the comparison . I'm not nuts about having a 2nd if statement that is largely duplicate code, but feel like it isn't really worth it to abstract it out into a function. Will if you think I should though.
MSGJ this one is for you! Zackmann (Talk to me /What I been doing ) 09:26, 14 October 2025 (UTC) [reply ]
- I would suggest making the delimiter the "=" sign since it is valid to have a comma in a parameter name. Frietjes (talk) 00:10, 15 October 2025 (UTC) [reply ]
- @Frietjes: Facepalm Facepalm You can put a comma in a parameter name?! WHY would you do that... I drew my ispiration for Module:template wrapper which uses CSVs. In any case, I'm worried about how that will look to the editor since "=" is traditionally used to assign a value to a parameter. IMHO it is harder to read and more confusing. What do you think about using a semicolon instead? I cannot fathom someone using a semi colon in a param name... - Zackmann (Talk to me /What I been doing ) 03:32, 15 October 2025 (UTC) [reply ]
- @Frietjes: I've updated it to use
;as the delineator per my previous comments. Also cleaned up extraneous comments that I missed last night. Let me know if that looks good. Zackmann (Talk to me /What I been doing ) 05:52, 15 October 2025 (UTC) [reply ]- it is valid to have a semicolon in a parameter name as well, which is probably why Module:TemplatePar uses = instead. Frietjes (talk) 21:08, 20 October 2025 (UTC) [reply ]
- I respect the hell out of your opinion, but I decided to push forward with the use of semi-colon in favor of readability. Module:Check for clobbered parameters uses this so I think it should work. I just really don't see a use case where someone has a semi-colon in their param name. Plus the worst case scenario is that that parameter can't be properly listed for deprecation with this template. Zackmann (Talk to me /What I been doing ) 07:29, 22 October 2025 (UTC) [reply ]
- it is valid to have a semicolon in a parameter name as well, which is probably why Module:TemplatePar uses = instead. Frietjes (talk) 21:08, 20 October 2025 (UTC) [reply ]
- @Frietjes: I've updated it to use
- @Frietjes: Facepalm Facepalm You can put a comma in a parameter name?! WHY would you do that... I drew my ispiration for Module:template wrapper which uses CSVs. In any case, I'm worried about how that will look to the editor since "=" is traditionally used to assign a value to a parameter. IMHO it is harder to read and more confusing. What do you think about using a semicolon instead? I cannot fathom someone using a semi colon in a param name... - Zackmann (Talk to me /What I been doing ) 03:32, 15 October 2025 (UTC) [reply ]