Template talk:Resolve category redirect

Tricky cases

edit

@BrownHairedGirl: I inserted this in {{Image requested}}, [1] but it is not working as expected to empty Category:Wikipedia requested photographs in Northwest Territories. Please can you help?

So far it is only working on Talk:Back River volcanic complex and four others after null edits on the whole set, plus 5 using WP Canada template, leaving 33 still in the old category.

D'oh! The redirect {{reqphoto}} uses a separate template. All done now.
This "resolve" template is coming in very handy, as noted at CFDWM. – Fayenatic London 10:27, 29 May 2021 (UTC)Reply

Rcat needed

edit

I suggest we need a new Rcat template, like {{R from category navigation}}, for other cases where categories are generated by templates, to notify that the redirect should not be deleted.

"R from autogenerated category"? – Fayenatic London 10:31, 29 May 2021 (UTC)Reply

Thanks for the ping, @Fayenatic. As usual, I think you are right. There have been several occasions where I used {{R from category navigation}} as the best tag available, even tho that description wasn't strictly true.
It seems to me that a full description of the function of these redirects would be something like "R from a category which has been autogenerated by a category header template which can resolve this category redirect". That's obviously much too verbose for a title, and while I think it might help to include "category header template" in the title, I can't see any way of doing so which is both concise and meaningful.
So I'll go with your proposed title. --BrownHairedGirl (talk) • (contribs) 14:06, 29 May 2021 (UTC)Reply
@Fayenatic london and BrownHairedGirl: what are some examples?   ~ Tom.Reding (talkdgaf)  12:05, 30 May 2021 (UTC)Reply
@Tom.Reding: e.g. Category:Establishments in Pondicherry by year. --BrownHairedGirl (talk) • (contribs) 12:26, 30 May 2021 (UTC)Reply
Category:Wikipedia requested photographs in Northwest Territories, using {{Photo requested}} and {{Image requested}}
Category:Fair use images of movie posters, using {{Non-free poster}}Fayenatic London 07:23, 31 May 2021 (UTC)Reply
@Fayenatic london and BrownHairedGirl: interesting - I don't know the details why these #Rs have to exist (haven't looked deeper, but might later), but if they and/or others must exist, then {{R from autogenerated category}} or {{R from template-generated category}} seems very appropriate to make.   ~ Tom.Reding (talkdgaf)  11:00, 1 June 2021 (UTC)Reply
Thanks, Tom. {{R from template-generated category}} is a bit more self-explanatory. The purpose of the Rcat is to avoid deletion of category redirects which appear at first glance to be eligible for deletion as empty, yet are having a necessary effect.
@BrownHairedGirl: do you want to be able to track redirects specifically from category header templates? My examples above are from other types of templates, e.g. file templates/ talk page templates. – Fayenatic London 21:35, 1 June 2021 (UTC)Reply
@Tom.Reding: these redirects need to exist when a category series changes name. E.g. "Cat:Years in Foo" may include pages "Cat:yyyy in FooBar", before the country's name was changed in 1532 after the Great FooBarian War. So when the cathead templates is used on years before 1532, it will try to parent that cat in "Cat:Years in FooBar". However, it resolves the catredirect from "Cat:Years in FooBar" to "Cat:Years in Foo". That's the type of catredirect to be tagged.
I agree with @Fayenatic that {{R from template-generated category}} is more self-explanatory. No, I don't think we need tie this explicitly to catheads, and if other types of template may use this, we need the more inclusive name. --BrownHairedGirl (talk) • (contribs) 21:56, 1 June 2021 (UTC)Reply

Resolving redirects with exclamation points in the target's title

edit

At Module:Resolve category redirect/sandbox, I made an edit which seems to allow {{resolve category redirect|This category has an exclamation point in the title!}} to be resolved properly. (And before you give me too much credit, all I did was remove ! from the "just return the input" list.)

It seems like the exclamation point was causing issues (see Template:Resolve category redirect#Templates), but allowing the exclamation point seems to be working fine at Template:Resolve category redirect/testcases.

Is there any special reason that ! in the input would cause issues? Maybe something with Lua patterns? If not, are we good to push my sandboxed edit to the live version? I would ping BHG, but she wouldn't be able to respond. Therefore, I will ping Tom.Reding who wrote the code which became this module. HouseBlaster (talk · he/they) 22:40, 6 August 2024 (UTC)Reply

@HouseBlaster: BHG added that particular exclusion. Looking at edits surrounding that, it looks like this discussion spurred it, but ! was not involved, I don't think, so it might've just been a precaution. So, given the working sandbox testcases, I don't see a problem relaxing the ! restriction, and handling exceptions if/when they come up. I might also try to add resolution of {{Title year}}, etc. in category titles, but later.   ~ Tom.Reding (talkdgaf)  10:42, 7 August 2024 (UTC)Reply
Awesome. Thank you so much for looking into this :) HouseBlaster (talk · he/they) 12:23, 7 August 2024 (UTC)Reply