Template talk:Resolve category redirect
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||
|
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)
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)
- 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)
- @Fayenatic london and BrownHairedGirl: what are some examples? ~ Tom.Reding (talk ⋅dgaf) 12:05, 30 May 2021 (UTC)
- @Tom.Reding: e.g. Category:Establishments in Pondicherry by year. --BrownHairedGirl (talk) • (contribs) 12:26, 30 May 2021 (UTC)
- 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)
- @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 (talk ⋅dgaf) 11:00, 1 June 2021 (UTC)
- 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)
- @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)
- @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 (talk ⋅dgaf) 11:00, 1 June 2021 (UTC)
- @Fayenatic london and BrownHairedGirl: what are some examples? ~ Tom.Reding (talk ⋅dgaf) 12:05, 30 May 2021 (UTC)
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)
- @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 (talk ⋅dgaf) 10:42, 7 August 2024 (UTC)- Awesome. Thank you so much for looking into this :) HouseBlaster (talk · he/they) 12:23, 7 August 2024 (UTC)
Bug report
[edit]Looking at the new Category:Wikipedia soft redirected categories which cannot be resolved, it seems like all of the current exceptions are categories which have a valid namespace/interwiki prefix after the category prefix. For instance, Category:Template:IPDB ID different from Wikidata and Category:D:Ream albums (noting that D:Ream albums is a interwiki to Wikidata) are unable to be resolved. Is this something that can be quickly fixed? Or should we just add a note to the documentation that this is a known issue?
It currently affects six categories, so I the problem is not urgent by any stretch of the imagination. (And I don't think those are being resolved anywhere, but it is something that should be documented so people are aware.) Pinging Tom.Reding again, though unless it is a five-second fix it can safely go very low on the to-do list. Best, HouseBlaster (talk · he/they) 02:48, 10 August 2024 (UTC)
Fixed & Category:Wikipedia soft redirected categories which cannot be resolved (0) cleared! ~ Tom.Reding (talk ⋅dgaf) 10:12, 10 August 2024 (UTC)
- This fix changed the conditions where {{Resolve category redirect}} would and wouldn't return a category name prefixed with
Category:
, but I suspect that's already accounted for by mature templates/modules anyway by stripping the prefix regardless, and then replacing it if necessary. I'm monitoring Category:Pages with script errors (585) just in case, which has not blown up. ~ Tom.Reding (talk ⋅dgaf) 10:41, 10 August 2024 (UTC)- To maintain #Resolving redirects with exclamation points in the target's title, the
Category:
prefix needed to be pre-stripped anyway before being passed tomw.title.makeTitle()
. In terms of consistency, this gives an additional benefit:Category:
is never returned. ~ Tom.Reding (talk ⋅dgaf) 11:07, 10 August 2024 (UTC)- Amazing. Thank you so much :) HouseBlaster (talk · he/they) 11:24, 10 August 2024 (UTC)
- To maintain #Resolving redirects with exclamation points in the target's title, the
- This fix changed the conditions where {{Resolve category redirect}} would and wouldn't return a category name prefixed with