Jump to content

Wikipedia:Templates for discussion/Log/2024 July 19

From Wikipedia, the free encyclopedia

Fails WP:NENAN after the season articles were merged (three links, two bar the header). -- Alex_21 TALK 00:23, 19 July 2024 (UTC)[reply]

Template with no transclusions that has been marked as deprecated since 2021. – Jonesey95 (talk) 16:56, 10 July 2024 (UTC)[reply]

Relisted to generate a more thorough discussion and clearer consensus.
Please add new comments below this notice. Thanks, Primefac (talk) 00:02, 19 July 2024 (UTC)[reply]

The 2018 TfD says that "a soft redirect in a module is not possible". That's not true anymore. require('Module:Module wikitext')._addText('{{soft redirect|Module:Citation/CS1}}') would do exactly that. I'm not saying the closer made a mistake; Module:Module wikitext was created two years after the TfD, but that doesn't mean we can't reevaluate the close since things have changed now. Nickps (talk) 15:31, 8 July 2024 (UTC)[reply]

Pinging @Trappist the monk since their comment on RfD brought the module to my attention. Nickps (talk) 15:34, 8 July 2024 (UTC)[reply]
Umm, that require() doesn't work. I don't know why and I'm not going to take the time to figure it out. Currently, if Module:Citation is invoked you get:
{{#invoke:Citation|citation}}
Lua error in Module:Citation at line 1: This module is retained for historical and structural reasons; consider using Module:Citation/CS1..
I think that error message appropriate. Readers should never see it but editors will if they are doing something that they ought not do (and are paying attention ...).
If we want to 'soft redirect' Module:Citation can't we just add {{soft redirect|Module:Citation/CS1}} to someplace in Module:Citation/doc and be done?
Trappist the monk (talk) 19:26, 8 July 2024 (UTC)[reply]
That require doesn't work because it just redirects the page. If you add a second line that says return require [[Module:Citation/CS1]] under it, then the module will be functional too. Nickps (talk) 19:58, 8 July 2024 (UTC)[reply]
I've edited Module:Sandbox/Nickps to demonstrate. {{#invoke:Sandbox/Nickps|citation}} gives Lua error in Module:Citation/CS1 at line 4150: attempt to concatenate a nil value. which doesn't look too promising at first but it's the same error as {{#invoke:Citation/CS1|citation}}: Lua error in Module:Citation/CS1 at line 4150: attempt to concatenate a nil value. which means the redirect is working. Nickps (talk) 20:02, 8 July 2024 (UTC)[reply]
Actually, I just pushed the change to Module:Citation directly as a proof of concept. It can always be reverted later. Nickps (talk) 20:06, 8 July 2024 (UTC)[reply]
What is it that I am not understanding? You get the Lua error in Module:Citation/CS1 at line 4150 error message because of line 2 at Module:Citation (permalink). It is not obvious that line 1 (permalink) is doing anything that we want. If, as WP:SOFTREDIR says, Soft redirects differ in that they leave the reader on the redirect page that isn't happening because line 2 is pretty much the equivalent of a hard redirect. So tell me, what it is that you are attempting to accomplish with your edit? That edit puts the soft redirect outside of the module documentation. Wouldn't it be better to add {{soft redirect}} to the ~/doc page?
Part of my misunderstanding was that I expected an invoke of Module:Citation to do nothing but put up a soft redirect annotation and halt as WP:SOFTREDIR sort of suggests that it should. The soft redirect annotation is for direct wikilinks ([[Module:Citation]]Module:Citation). That being the case, I see no benefit to be gained by using the module to create the soft redirect annotation when the same can be accomplished by including {{soft redirect}} in the ~/doc page.
Just what am I missing?
Trappist the monk (talk) 21:51, 8 July 2024 (UTC)[reply]
Now I'm confused. If you open Module:Citation you're left at the redirect page. So by the definition you provide, that's a soft redirect. I don't see how a redirect being soft or hard has anything to do with what it does when transcluded. Now, we could move the soft redirect template to the documentation page, although that would require changing the second line (then only line) to return require('Module:Citation/CS1') to avoid creating a hard redirect. Or, we could avoid this entire conversation and go with Pppery's suggestion of making a hard redirect. Nickps (talk) 22:17, 8 July 2024 (UTC)[reply]
If it must be a redirect, let it be a hard redirect or (my preference) leave it as it was and delete {{Citation/lua}} as unused/unnecessary. And then let us be done with this.
Trappist the monk (talk) 13:37, 9 July 2024 (UTC)[reply]
Agreed on a hard redirect being better than a soft one. Nickps (talk) 15:49, 9 July 2024 (UTC)[reply]
Here's a link to the previous TfD. Nickps (talk) 17:19, 8 July 2024 (UTC)[reply]

Relisted to generate a more thorough discussion and clearer consensus.
Please add new comments below this notice. Thanks, Primefac (talk) 00:01, 19 July 2024 (UTC)[reply]