@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 cle
| This module was considered for deletion on 2019 December 30. The result of the discussion was no consensus. |
| This is the talk page for discussing improvements to the Check for deprecated parameters module. |
|
| This module does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||
| ||||||||
@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)
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)
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)
@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)
; 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)
Editing and previewing Special:Permalink/1329046066 displays the following message: Preview warning: Page using Template:Infobox criminal with deprecated parameter ""nationality". It should be removed."
The outer pair of quotation marks seems undesirable. 1234qwer1234qwer4 03:46, 26 December 2025 (UTC)
@Frietjes and Hike395: I was toying with the idea of adding support for regexps similar to how it was do on Module:Check for unknown parameters. I started trying to mock it up in the sandbox but I couldn't really suss out how to make it happen... If either of you have any thoughts on how to make it work... My thinking is am implemention that would look something like this but am of course open to suggestions. I just can't think of an efficient way to check each parameter against the regex AND then show the matching regex of what the param should be changed to... Any thoughts would be greatly appreciated! Zackmann (Talk to me/What I been doing) 05:01, 8 March 2026 (UTC)
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.