Template talk:Category redirect

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
WikiProject iconCategories
WikiProject iconThis template is within the scope of WikiProject Categories, a collaborative effort to improve the coverage of categories on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
WikiProject iconRedirect Template‑class
WikiProject iconThis page is within the scope of WikiProject Redirect, a collaborative effort to improve the standard of redirects and their categorization on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Note: This banner should be placed on the talk pages of project, template and category pages that exist and operate to maintain redirects.
This banner is not designed to be placed on the talk pages of most redirects and almost never on the talk pages of mainspace redirects. For more information see the template documentation.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

The template gives error message[edit]

See Category:Language articles with undated speaker data. The page shows a red error text: Expression error: Unrecognised punctuation character ",".. When I remove this template and preview, it disappears (so it is not from a regular, listed page, I think). Possibly related: at this moment the category is not empty though does not show in Category:Wikipedia non-empty soft redirected categories. Last week, there have been edits in the template that autofills this category, also wrt this cat name (into and out of). Can someone take a look? -DePiep (talk) 16:32, 31 March 2012 (UTC)[reply]

Found: {{PAGESINCATEGORY:{{PAGENAME}}}} produces 1,523 at the moment. Self-solving. -DePiep (talk) 16:50, 31 March 2012 (UTC)[reply]
It can be fixed by changing to {{PAGESINCATEGORY:{{PAGENAME}}|R}}. Peter James (talk) 19:31, 9 August 2012 (UTC)[reply]

Avoid this template appearing in the category it is manipulating[edit]

Please add <includeonly/> around the default category this template is adding so it doesn't appear in the category. I.e. change

}}[[Category:Wikipedia soft redirected categories]]

to

}}<includeonly>[[Category:Wikipedia soft redirected categories]]</includeonly>

as I have in the sandbox. Mark Hurd (talk) 06:57, 12 April 2013 (UTC)[reply]

OK, Done --Redrose64 (talk) 12:42, 12 April 2013 (UTC)[reply]
To avoid {{Category redirect/testcases}} showing up in Category:Wikipedia soft redirected categories, I've changed the sandbox version line
}}<includeonly>[[Category:Wikipedia soft redirected categories]]</includeonly>
to
}}<includeonly>{{#ifeq:{{NAMESPACE}}|Category|[[Category:Wikipedia soft redirected categories]]}}</includeonly>, for your consideration. --Slivicon (talk) 16:53, 4 August 2015 (UTC)[reply]
 Done with a twist that allows capture by CAT:WRONG of all incorrect usages. – Paine  19:18, 4 August 2015 (UTC)[reply]

Allow for flexibility in parameter passing[edit]

It would be enormously helpful if this template accepted both the current parameter (the name of the category to which to redirect, e.g. "People," sans the "Category:" namespace) but also the full name of the category, including namespace (e.g. "Category:People"). In other words, I want to be able to use this template with either of the two following calls:

  • {{Category redirect|People}}
  • {{Category redirect|Category:People}}

It's not immediately intuitive which form to use, so it would be nice for the template to accept both.

Furthermore, I often have something like "Category:People" on my clipboard and I'd like to just copy and paste it into the template when I use it. As it stands, I have to delete the word "Category:", or else accidentally save the redirect in a malformed way (so it will redirect to something like "Category:Category:People"). Thank you. CaseyPenk (talk) 03:40, 2 September 2013 (UTC)[reply]

I've put some mods into the sandbox which should do what is suggested above. --Redrose64 (talk) 09:50, 2 September 2013 (UTC)[reply]
Please wait 48 hours on this so I can check how it will affect the category redirect bot. Thanks. --R'n'B (call me Russ) 13:22, 2 September 2013 (UTC)[reply]
The sandbox revisions may produce undesired results if, for example, someone creates a redirect to Category:Wikipedia:Trolls. (Try {{Category redirect/sandbox|Wikipedia:Trolls}}. In fact, now that I think about it, I think this was the reason that previous efforts to modify the template to allow including the "Category:" prefix were unsuccessful. --R'n'B (call me Russ) 18:38, 2 September 2013 (UTC)[reply]
This is why we sandbox proposed changes to templates. Anyway, try it now --Redrose64 (talk) 19:21, 2 September 2013 (UTC)[reply]
Yes, that seems to do the trick. Very nice! But I still need to check the bot code to make sure it will work with this version. --R'n'B (call me Russ) 00:30, 3 September 2013 (UTC)[reply]
  • I've checked the bot code and we should be fine. It already recognizes redirects of the form {{Category redirect|Category:Foo}} and changes them to {{Category redirect|Foo}} on the assumption that they are invalid. With the new template code, it will still change them, but they will be valid either way. I don't want to change this because the script is designed to work on any wiki, and other wikis may not accept the first form as valid. --R'n'B (call me Russ) 13:52, 4 September 2013 (UTC)[reply]
OK, Done --Redrose64 (talk) 15:09, 4 September 2013 (UTC)[reply]

Template protection[edit]

Can this template be converted to use template protection instead of full protection? Thanks. mc10 (t/c) 01:08, 28 October 2013 (UTC)[reply]

Not done: requests for changes to the page protection level should be made at Wikipedia:Requests for page protection. Jackmcbarn (talk) 01:46, 28 October 2013 (UTC)[reply]
Alright, thanks for the notice. mc10 (t/c) 01:58, 28 October 2013 (UTC)[reply]

Do robots patroll automatically the redirect categories?[edit]

Hello there, I just changed a few categories into redirect categories (for example this one) and I wonder if there are robots that hunt for "Category:Wikipedia non-empty soft redirected categories" and move the articles in the right categories automatically. Thanks. —  Ark25  (talk) 06:03, 5 December 2014 (UTC)[reply]

  • There is such a bot. But this is not its intended use. If you want to rename a category, you should follow the process at WP:CFD. --R'n'B (call me Russ) 11:09, 5 December 2014 (UTC)[reply]

Change to include a speedy tag when target doesn't exist?[edit]

I think that we should add, to this template, a speedy tag which appears if the target category is deleted. The template {{db-redirnone}}, which applies to "a redirect to itself, or to a page which does not exist, has been deleted, or is itself currently tagged for speedy deletion" should apply here if the target is deleted. עוד מישהו Od Mishehu 07:18, 15 December 2015 (UTC)[reply]

We should consider the case if there is a rename. I am also concerned as to who is responsible for the placement of the speedy delete tag (no one but it should be the target deleter. And also any notification that would not occur). It would be even better to notify the deleter at the time of deletion that there are these redirects pointing to the just deleted target. This would apply to other things apart from category redirects. Graeme Bartlett (talk) 09:42, 15 December 2015 (UTC)[reply]
Technically, the soft redirects are nothing but incoming links, so it would probably be nearly impossible to have the software notify the deleter about these. We do have warnings about incoming links, but since there nearly always are incoming links for other reasons, this warning would tend to be useless. עוד מישהו Od Mishehu 11:45, 15 December 2015 (UTC)[reply]

Can we redirect one category to multiple categories?[edit]

I think it may be useful to redirect one category to several other categories so that they can be automatically placed in those categories. This would be a useful way to automate the cleanup of WP:Overcategorization, which now seems to require a tedious and time-consuming cleanup process.

Of course, this might not be the best solution to this problem. Can anyone suggest a better way to automatically split categories? Jarble (talk) 08:35, 11 January 2016 (UTC)[reply]

Not sure what you mean by this - do you mean you want every entry in Category:A to become members of Category:B and Category:C (B and C are existing categories), then deprecate Category:A? Deryck C. 17:19, 20 February 2016 (UTC)[reply]

@Deryck Chan: Yes, that's what I am proposing. For example, {{category redirect|B|C}} would redirect a page to Category:B and Category:C. It would be a very reasonable way to solve the problem of overcategorization. Jarble (talk) 22:33, 14 November 2016 (UTC)[reply]

Could you give a real, specific example as an illustration? In the abstract, I can't see what benefit you're hoping to accomplish. Particularly given that OC is generally about having an article be placed in too many categories rather than too few. Unless you're trying to automate how to split up overly specific intersection categories...don't we already have tools for that? postdlf (talk) 22:18, 30 May 2017 (UTC)[reply]
@Postdlf and Deryck Chan: I haven't yet found any tools to split overly-specific intersection categories like this one. A "category intersection" feature was proposed several years ago, but it has not been implemented yet. Jarble (talk) 14:54, 18 May 2018 (UTC)[reply]
@Postdlf and Deryck Chan: If {{category redirect}} supported multiple targets, I would use it to split overly specific categories like Category:Software developers from New York City:
{{category redirect|Category:People from New York City|Category:American software developers}}
Then every page in that category would be automatically moved into the other two categories. Jarble (talk) 19:40, 4 November 2023 (UTC)[reply]

Template-protected edit request on 19 August 2016[edit]

Could you please wrap the <small>'''[[Wikipedia:Administrators|Administrators]]''': If this category name is unlikely to be entered on new pages, [{{fullurl:{{FULLPAGENAME}}|wpReason={{urlencode:This category is located at [[{{{1}}}]]. }}}}&action=delete click here to delete].</small> part in <span class="sysop-show">s, so that that text isn't visible for non-admins.

Pppery (talk) 01:13, 19 August 2016 (UTC)[reply]

Done — Andy W. (talk ·ctb) 01:43, 19 August 2016 (UTC)[reply]

Template-protected edit request on 14 November 2019[edit]

[[File:Redirect arrow.svg|52px]] → [[File:Redirect arrow.svg|52px|link=]]. The image is in the public domain. ~~ CAPTAIN MEDUSAtalk 23:58, 14 November 2019 (UTC)[reply]

 Done DannyS712 (talk) 00:34, 15 November 2019 (UTC)[reply]

The instructions[edit]

‘See instructions[…]’ would be more natural than the current wording, ‘See the instructions[…]’. Would someone kindly remove the definite article? Cheers —jameslucas ▄▄▄ ▄ ▄▄▄ ▄▄▄ ▄ 02:50, 13 February 2021 (UTC)[reply]

I followed the link to "the instructions" from this new category I created - 'Category:Musicians with Dystonia' - but I don't understand what I'm supposed to do. Thank you in advance for more instructions. Kire1975 (talk) 23:48, 5 May 2021 (UTC)[reply]
Belated thanks for your note. I have deleted the redirect Category:Musicians with Dystonia which was left by moving the page to Category:Musicians with dystonia, and added some instructions about keeping or deleting redirects. – Fayenatic London 08:05, 30 January 2022 (UTC)[reply]

Edit request to complete TfD nomination[edit]

Template:Category redirect has been listed at Templates for discussion (nomination), but it was protected, so it could not be tagged. Please add:

{{subst:tfm|help=off|1=R from category navigation}}

to the top of the page to complete the nomination. Thank you. HouseBlastertalk 14:53, 15 December 2023 (UTC)[reply]

 Done — Martin (MSGJ · talk) 16:32, 15 December 2023 (UTC)[reply]

Edit request 19 January 2024[edit]

Please sync with the sandbox (see also Template:Category redirect/testcases) to implement Wikipedia:Templates for discussion/Log/2023 December 24#Template:R from category navigation. Thanks! HouseBlaster (talk · he/him) 05:48, 19 January 2024 (UTC)[reply]

Looks like an error has been made, because no rcat template that uses the {{Redirect template}} meta template can be used on soft redirects, and category redirects are always soft redirects. Moreover, the documentation states to wrap with the {{Rcat shell}} template, which also specifically states it's not to be used on soft redirects. Wassup??? P.I. Ellsworth , ed. put'er there 07:51, 19 January 2024 (UTC)[reply]
This needs input from the creator of the "rcat template", editor Tom.Reding. Rcat templates serve two purposes, 1) supply information to editors about the type of categorization, and 2) categorize the redirect. While {{R from category navigation}} supplies information, it does not categorize the category redirect. So it is not an "rcat template" (redirect category template), it is an "r-info-only template". I don't understand the way the redirect categorization system appears to be being used incorrectly in this case? P.I. Ellsworth , ed. put'er there 08:20, 19 January 2024 (UTC)[reply]
@Paine Ellsworth: thanks, I wasn't aware of that soft-redirect nuance with {{Redirect template}}. I was using {{Redirect category shell}} for page-layout/prettification purposes, to make the cat #Rs look like this, and not like this. {{R from category navigation}} has ~1800 transclusions which use {{Redirect category shell}}, and they have been in place for years without any issues that I'm aware of, so maybe {{Redirect template}}'s "If used on soft redirects, such as category redirects, there may be unexpected results, because this template may prove to be unstable if used on a soft redirect." either doesn't apply here, or it can be relaxed in this case? If not, @HouseBlaster: would removing {{Redirect category shell}} from those transclusions be an ok alternative?
Courtesy ping to Fayenatic London.  ~ Tom.Reding (talkdgaf)  09:13, 19 January 2024 (UTC)[reply]
At a glance it appears that the reason the {{R from category navigation}} template is stable on the category redirect is because it does not actually categorize the redirect. What I've seen in the past, especially with category redirects is that if an rcat that actually categorizes the redirect is used, then the category redirect is added to the rcat's category as a subcategory rather than as a regular entry, which is an unexpected and undesired result. One concern then would be if an editor in the future were to add a tracking category to R from category navigation using the |main category= parameter, which would result in the subcategory problem I described above. Perhaps if that parameter were removed from R from category navigation, and it is made clear in the template's documentation that such a tracking category should not be created and used with that template, this problem would not arise.
As for the {{Rcat shell}} template, I added that warning about not using it on soft redirects long ago before there were any specially made rcat templates that were created and designed to be used only on soft redirects (that did not use the Redirect template meta template). So since the Rcat shell uses the {{Mbox}} meta rather than the Redirect template meta, I really don't see any problem with it's usage on soft category redirects. I can remove that warning from its documentation to accomodate its usage in this new, innovative application.
And this edit request has been  completed. P.I. Ellsworth , ed. put'er there 10:34, 19 January 2024 (UTC)[reply]
 Parameter removed [1]. Per BEANS, I decided not to add a note to the documentation, but if you think that's still necessary, then feel free to add it.   ~ Tom.Reding (talkdgaf)  10:56, 19 January 2024 (UTC)[reply]
You know, Tom, I was just in the process of removing the note from the Rcat shell doc page, when I remembered why the Rcat shell can't be used on soft redirects. While it does not use the Redirect template, it does use four protection rcat templates, such as {{R template protected}}, and those protection templates use the Redirect template meta. What this means is that if the Rcat shell is used on a protected category redirect, whether its full protection right down to semi-protection, the subcategory problem will arise in the protection categories. Sorry, I was wrong and have to undo this edit. P.I. Ellsworth , ed. put'er there 11:30, 19 January 2024 (UTC)[reply]
@Paine Ellsworth: the goal of the TfD & edit request are to move {{R from category navigation}} out of {{Redirect category shell}}. Are you saying that {{Category redirect}} ends up calling {{Redirect category shell}} anyway? My apologies for having trouble following which templates call what.   ~ Tom.Reding (talkdgaf)  13:10, 19 January 2024 (UTC)[reply]
So the rcat shell is to be removed? That makes sense now. Thank you for being patient with me, Tom! and once again this edit has been  completed. P.I. Ellsworth , ed. put'er there 19:03, 19 January 2024 (UTC)[reply]
Thank you both! I have now added to the documentation on the three templates.
I'm still confused by some of the above. I don't understand the objection to category redirects being sub-cats of Rcat categories; this is normal in other tracking categories about category space, at e.g. Category:Non-empty disambiguation categories and Category:Category series navigation cleanup. – Fayenatic London 11:09, 27 January 2024 (UTC)[reply]
To editor Fayenatic london: looks like at least one of those categories was designed as a container for only subcategories. Rcat categories are not so designed. Regardless of namespace, when any redirect page is tagged by an rcat template, the page should appear as an entry in the rcat template's category, not as a subcategory. That has always been regarded as one of the possible "instabilities" when any template that uses the Redirect template meta template is used to tag a soft redirect, per the warning in that template's documentation. P.I. Ellsworth , ed. put'er there 16:43, 27 January 2024 (UTC)[reply]
To editor Paine Ellsworth: thanks; I meant rather to indicate its non-empty subcats such as Category:Category series navigation isolated, which tracks category pages using a template with a certain outcome, and happens to display them as sub-categories.
The justification for keeping a category redirect for a variant spelling (esp. organi[s/z]ation) or hyphen-to-dash is so similar to that for article space that I still don't grasp the ban on documenting their raison d'etre with {{R from alternative spelling}} or {{R to diacritic}}. – Fayenatic London 17:09, 27 January 2024 (UTC)[reply]
Hopefully the mist will clear. I'm sure you grasp what happens; heck, if you're like me, you may have already tested it and found that it actually does happen. Thing is, if any normal rcat template is used on a soft category redirect, and that redirect becomes a subcategory in that rcat template's category, while other similar redirects are entries in that category, it would be misleading to editors, make them scratch their heads and wonder why. After all, a subcategory is like a child category, and that rcat category is decidedly not that category redirect's "parent" category. It would essentially be a case of bastardizing the category tree organizing system, wouldn't it? P.I. Ellsworth , ed. put'er there 18:34, 27 January 2024 (UTC)[reply]
Aaah, looking at Category:Redirects from alternative names I see that it has actual functional sub-cats; so if category-space redirects were tagged with that template, nobody would want them to appear mixed in with those. But that could easily be fixed by having a special holding category for them, "Category redirects from alternative names". – Fayenatic London 23:01, 27 January 2024 (UTC)[reply]
Could be done, yes. A new rcat template, something like {{R category redirect from alternative name}} could be constructed without the Redirect template meta and its instabilities, which could populate Category:Category redirects from alternative names. Then those redirects would be entries rather than subcategories. Other sortings of category redirects could follow as needed. Lotsa work involved. P.I. Ellsworth , ed. put'er there 13:32, 28 January 2024 (UTC)[reply]
Hmm, but is the meta template so unstable that it couldn't handle a little variation in {{R from alternative name}}, so that the latter when used in cat space generates Category:Category redirects from… rather than Category:Redirects from… ? – Fayenatic London 14:58, 28 January 2024 (UTC)[reply]
Here's raising your "Hmm" with a starkly surprised "Hmmmmm"; yes, I'm astonished that you still don't seem to "get it". Of course! I can do just about anything with templates except make my lunch and do the dishes. I can also drive a Corvette Stingray at 200 mph through a 15 mph school zone, which simply put means that just because one CAN do something, it doesn't necessarily mean that one should do it. No matter how we shake it, the meta template's instability would cause all those cat redirs to become subcats rather than entries in that proposed special holding cat, and that cat would not be a true parent cat for any of those bastard children subkittens. P.I. Ellsworth , ed. put'er there 18:38, 28 January 2024 (UTC)[reply]
Now I'm lost. I don't understand how the hypothetical {{R category redirect from alternative name}} could populate Category:Category redirects from alternative names with category redirects that "would be entries rather than subcategories." Won't they always appear as subcategories, as they do in the cleanup tracking categories above? I thought the substance of the objection was that we don't want to mingle redirected category pages with functional subcats in e.g. Redirects from alternative names. – Fayenatic London 22:25, 28 January 2024 (UTC)[reply]
Sorry if I lost you there, editor Fayenatic london; didn't mean to. Seems the reason might be because I was a bit lost myself. Did more tests and found that the reason a category redirect, when tagged by any template that sorts to another category, becomes a subcategory rather than just an entry, is due to the nature of the category namespace itself. I tested by using an Ambox meta rather than the Redirect template meta (as you may know, the Ambox template is not considered "unstable" in any namespace), and the category redirect still became a subcategory of the sorting category rather than just an entry. Apologies for being misleading; I should have done the tests before I mouthed off. So if one really wants to track category redirects, one will have to settle for seeing them as subcategories rather than as entries, with a warning that such sortings are inconsistent with the "normal" category tree organization system. I still must recommend that the Redirect template should not be used as a meta in any template that tags soft redirects. The Ambox meta is a much wiser way to go. An example of its usage will be found in the code of the {{Soft redirect with Wikidata item}} rcat template. P.I. Ellsworth , ed. put'er there 16:11, 29 January 2024 (UTC)[reply]
Thank you – so we agree about where the pages appear if categorised. Now, about using {{Redirect template}}: both Tom.Reding's {{R from category navigation}} and my derivative {{R from template-generated category}} have been using it as their meta template for 5 and 3 years respectively. Have any problems arisen from that usage until now?
I acknowledge that now we do have a documentation error: the default text from that meta template refers to {{Redirect category shell}}, but after your recent work those two now use {{Category redirect}} as their shell. Do we need to rewrite those two using a different meta just to avoid the out-of-date default documentation? – Fayenatic London 17:51, 29 January 2024 (UTC)[reply]
Also, unless we are going to categorise the redirects, do we need to amend the "shell" wording which you copied into {{Category redirect}}? Instead of "The following categories are used to track and monitor this redirect", should it be something like "The following templates explain the purpose of this redirect"? – Fayenatic London 22:38, 29 January 2024 (UTC)[reply]
By the way, I have since looked at the history of {{Redirect template}} including the "horrible hack" that's been in the module for 10 years, so respect to you for your work and vigilance on these matters. – Fayenatic London 10:48, 31 January 2024 (UTC)[reply]
So sorry, it didn't sound like you were responding to me, but to one of the others. I'm probably not the best person to ask about monitoring category redirects (or any other soft redirects) for instabilities. I've done very little work on soft redirects. The vast majority of redirects on WP are not soft redirects, they are what some call "hard" redirects, and that is where I've concentrated my work. I've no opinion on the meta's module or any need for /doc edits; however, I will say that in all my time on WP I've never come across the instabilities the meta template creators wrote into the documentation. That does not mean those instabilities don't exist, it just means that the only thing I've seen is the weird sorting as subcategories rather than as entries, and I mistakenly thought that was part of the instabilities problem, and as it turns out it is just a quirky trait of the category namespace. I wish I could be more help, but it would seem that my knowledge is limited. Thank you for your kind words, though! P.I. Ellsworth , ed. put'er there 18:06, 31 January 2024 (UTC)[reply]
OK, thanks. I tried using {{Soft redirect with Wikidata item}} inside {{Category redirect}} at Category:19th century in New Mexico, and it does not look great in that shell – RSVP. – Fayenatic London 10:52, 1 February 2024 (UTC)[reply]
Is that better? P.I. Ellsworth , ed. put'er there 19:04, 1 February 2024 (UTC)[reply]
Yes, thank you. – Fayenatic London 11:32, 2 February 2024 (UTC)[reply]