Template talk:Category redirect
If you think that a category needs redirecting then it is likely that it should be renamed or merged instead. You can list a category for renaming or merging at categories for discussion.
What this template is for
This template is used to create soft redirects from empty, poorly-named categories, or categories where AE/IE spelling differences may cause confusion, to active categories. This should only be done in rare circumstances, as MediaWiki developers are currently working on a software solution.
Instructions
To redirect from Category:Authors to Category:Writers, simply add the following to Category:Authors:
{{category redirect|Writers}}
Please do not use subst: on the template.
FAQ
- Q: Why not just use a regular redirect?
- A: That is the ideal solution. However, the MediaWiki software currently has issues with categories and redirects:
#REDIRECT [[Category:Whatever]]
does do the redirect, but the original category is listed as a subcategory ofWhatever
.#REDIRECT [[en:Category:Whatever]]
works, too, with the same problem as above. Also, this (technically) transwiki redirect fails to send the "redirected from <wherever>" message, which is needed for maintenance.#REDIRECT [[:Category:Whatever]]
works as a redirect, but does not prevent articles from being added to the "old" category.#REDIRECT [{{SERVER}}{{localurl:Category:Whatever}}]
doesn't work either (and even if it did, it would be a terrible hack).
- A: That is the ideal solution. However, the MediaWiki software currently has issues with categories and redirects:
- Q: But we shouldn't redirect unused or poorly-named categories; we should delete them!
- A: Generally, yes, we should list unused or poorly named categories on Wikipedia:Categories for deletion or Wikipedia:Candidates for speedy deletion. However, there are exceptions. See what links here to get an idea of what type of category redirects are useful.
- Q: Okay, but this template is still not a good long-term solution.
- A: True. This is a short-term solution. When the bug is fixed, we can simply use Special:Whatlinkshere/Template:Categoryredirect and fix all the wikicode.
- Q: Isn't that creating more work for ourselves?
- A: A little bit, yes. However, many Wikipedians have tried and failed to get category redirects to work, only to realize that it's a shortcoming of the MediaWiki system. Giving them a solution — even if it is a short-term solution — will waste less time in the near future.
- Q: If Category A redirects to Category B and User C puts Article D into Category A, then Article D won't show up on Category B like it should!
- A: This is an issue being solved by the MediaWiki development team, and it may account for the fact that category redirects do not work yet. As a result, category redirects are to be used lightly for the time being.
Bot FAQ
Written by AllyUnion (talk) 11:07, 3 January 2006 (UTC)
- Q: How often does the bot check to change and move stuff around?
- A: The robot is discontinued.
Comments
Comments are welcome. • Benc • 09:30, 15 Sep 2004 (UTC)
We use something equivalent to this in the portuguese wikipedia and it works very well. [[User:Muriel Gottrop|muriel@pt]] 16:23, 24 Nov 2004 (UTC)
Why limit usage?
The instructions say "This template is used to create soft redirects from empty, poorly-named categories, or categories where AE/IE spelling differences may cause confusion, to active categories. This should only be done in rare circumstances, as MediaWiki developers are currently working on a software solution." I am coming to the opinion that this statment should be changed. All good reference books tell you where to look if you try the wrong entry. So here is an alternate wording:
- "This template is used to help direct users to the correct name of a category. It should be used in all poorly-named categories, categories that have been renamed at WP:CFD, or categories where AE/IE spelling differences may cause confusion, to active categories. The template also helps alert editors when they have mis-categorizatized their article."
I suspect that using this template more instead of less would actually create less work. It could in effect change WP:CFD into Wikipedia:Categories to move. Category discussions would be less contentious if the depopulated category remained as a redirect. Perhaps, the software upgrade path is this:
- Use this template extensively to create and mark numerous category redirects.
- Create a bot that scans Category:Wikipedia category redirects and one category at a time moves miscategorized articles to the correct category. Run the bot frequently.
- Upgrade the software so that category redirects work the same as article redirects. (Articles categorized wrong would not show up in the correct category, but this would still be taken care of by the bot if the software upgrade doesn't make it automatic.) Also upgrade the software so that links to redirected categories appear in red.
- Using another bot, replace all the templates with "hard" redirects.
Modifications
What about changing the code as follows?
#REDIRECT [[:Category:{{{1}}}]]
:''This category is located at '''[[:Category:{{{1}}}]]'''.''
:''Note: This category page should be empty, with all of the articles contained being under [[:Category:{{{1}}}]]. See [[Template talk:Category redirect|this page]] for more information.'' [[Category:Wikipedia category redirects]]
The category is already looked after by a bot anyways. — Instantnood 18:55, 26 October 2005 (UTC)
- Would that work? I bet that using {{category redirect|foo}} would tell MediaWiki to include Category:foo as a template. dbenbenn | talk 01:40, 27 January 2006 (UTC)
- Yes it does. — Instantnood 20:15, 25 February 2006 (UTC)
Help required
I don't know if this is the place to ask, but i cannot get the category redirect function to work. I am trying to redirect Category:U.S. stage actors to Category:American stage actors - what code do i need and where do i put it? any help gratefully received. thanks Jdcooper 14:51, 11 November 2005 (UTC)
Copied to Wikicities
Copied, almost unchanged, to Wikicities.com, with thanks. "We" have a link to this page so as to keep up with the play. See http://cities.wikicities.com/wiki/Category:Maine%2C_U.S.A.
Robin Patterson 12:56, 5 November 2005 (UTC)
Category redirects work now - why use template?
Now that #REDIRECT [[:Category:PAGENAME]] works, is it even necessary to use this template? I've simply been redirecting pages like that, since it seems easiest. If the template is preferable, though, I'll gladly switch all the pages I've done so far (and all future category directs) to using the template. I just can't quite figure out from this Talk page whether there's any agreement on what to do, and there's a lot of categories that need moving. -Silence 08:16, 19 January 2006 (UTC)
- The problem is that if Category:FOO redirects to Category:BAR, and someone adds a page to Category:FOO, it won't show up in Category:BAR. The template is required so that the redirect appears in Category:Wikipedia category redirects, so that the bot will automatically fix things. dbenbenn | talk 01:39, 27 January 2006 (UTC)
- That's not really an issue for most of the categories I deal with: categories with odd names created to go with user templates (like moving "category:user pizza" to "category:wikipedians who eat pizza"). For those, once the user template's category is changed and everyone currently in the category is moved to the new one, it's highly unlikely that anyone will be added to the cat in the future. So, for those should I go with the redirect or this template? -Silence 01:43, 27 January 2006 (UTC)
- For those, I think it makes sense to simply delete the category, via WP:CSD (or just {{db|empty cat, replaced by FOO}}). dbenbenn | talk 03:31, 27 January 2006 (UTC)
- But I'm not an admin, and there are hundreds of categories which meet my above description of category replacements. Do you truly want me to add a "db" tag to all of those pages? For example, a category like Category:User pirate is completely useless and empty and will forever remain empty until the end of time, with nothing linking to it; it has been replaced by Category:Pirate Wikipedians. A "category redirect" template would be useless because it's highly unlikely that anyone will ever be added to the category in the future, and because a simple redirect would be much faster (and, unlike in the past, is possible on Wikipedia now); without adminship, even bothering to nominate a category for speedy deletion seems like it would require way more work than is feasible, especially since I'd have to provide a justification for every single speedy-delete nomination, and then some hapless admin should have to wade through dozens and dozens of such pages to delete them! Lose-lose-lose-lose-lose. So, again, what should I do? -Silence 22:24, 5 February 2006 (UTC)
- For those, I think it makes sense to simply delete the category, via WP:CSD (or just {{db|empty cat, replaced by FOO}}). dbenbenn | talk 03:31, 27 January 2006 (UTC)
- That's not really an issue for most of the categories I deal with: categories with odd names created to go with user templates (like moving "category:user pizza" to "category:wikipedians who eat pizza"). For those, once the user template's category is changed and everyone currently in the category is moved to the new one, it's highly unlikely that anyone will be added to the cat in the future. So, for those should I go with the redirect or this template? -Silence 01:43, 27 January 2006 (UTC)
Then why not have this template create a working category redirect, and add the category for the bot? —Michael Z. 2006-02-06 06:04 Z
- Wow. That's a pretty sexy idea. Avoids forcing people to make an extra click to go to the correct page and the hassle of the CfD system, while preserving all the benefits of categorizing such pages and letting bots maintain them. Superb; I'll try it now. Any objections? -Silence 21:30, 7 February 2006 (UTC)
- No dice; couldn't get the template to work with redirects, even though the categories themselves use redirects perfectly fine. This template seems to be pretty useless now that hard-redirecting categories is feasible. Unless anyone can find some way to make the template work with hard redirects, it should probably be phased out. -Silence 21:52, 7 February 2006 (UTC)
Everyone seems to have avoided the best, most obvious, solutions: Fix the software so entries added to a category redirect will appear in the correct location, or fix the bot to make such entries appear in the correct location. The bot already moves entries so they don't appear in categories with the template; why not just modify it to move entries so they don't appear in categories that say "#REDIRECT" either? — Preceding unsigned comment added by Brianjd (talk • contribs)
- Both things are unlikely. When the software detects a category change to each article (it does), it would check for a redirect, and modify the article text in place, all on a save. We don't do that for any kind of redirect. Difficult. The bot would have to do text search of potentially millions of articles for categories in them that have categories that are redirected. Massively difficult.
- What's difficult? Good programming is difficult, but this doesn't seem like a particularly difficult task. Storage presumedly isn't an issue; can't we add a flag to each category so checking if it was a redirect would be as easy as checking if it existed or not, which we have to do to render the page anyway? Brian Jason Drake 08:49, 31 July 2006 (UTC)
- …just modify [the bot] to move entries so they don't appear in categories that say "#REDIRECT" either. I am not aware of a mechanism by which the bot (which doesn't query the Wikipedia database directly) could automatically find #REDIRECT categories without the impracticable expedient of blindly checking every category. It currently requires humans to show it what are category redirects: that's what the {{Category redirect}} template does. --RobertG ♬ talk 11:23, 1 September 2006 (UTC)
I've done the Range Creek article. Why are you objecting? And why is it red? — Preceding unsigned comment added by FourthAve (talk • contribs) 07:50, 13 March 2006 (UTC)
Robot
After the apparent semi-retirement of NekoDaemon, my robot RobotG (talk • contribs • page moves • block user • block log) is just about ready to take this over. It will be run ad-hoc starting in the next day or two rather than run automatically every hour, and will log its actions at User:RobotG/Category redirect log. I should be grateful if everyone could keep an eye on this for a while until it beds in. Let me know if there are any problems. --RobertG ♬ talk 16:34, 10 July 2006 (UTC)
- The dry run has seemed successful. To see the robot's category moves, see its contributions history; the robot now only logs actions that require human intervention, listing them at User:RobotG/Log, and these are removed as they are dealt with. User:RobotG/Category redirect log is no longer used. --RobertG ♬ talk 09:33, 13 July 2006 (UTC)
- The robot is now discontinued with its owner's retirement. --RobertG ♬ talk 07:31, 24 March 2007 (UTC)
Another problems not listed above
Another problems with the #REDIRECT [[Category:Foo]] method above, is that when you click "What links here" at the destination page, the redirect doesn't show up in the links! Carcharoth 13:37, 22 September 2006 (UTC)
- All redirects pages should include a {{R from...}} template on the line, listed in Category:Redirects and it's subcategories. However, apparently due to the prohibition on such 'Hard Category Redirects' in the past, there seems to currently be no Template:R from other category name(edit talk links history) template or category. Changes always cause some confusion, and whilst such Hard redirects are now supported in system software (as they weren't, and so were depreciated), I confess I don't know the current consensus on using them now. If they're legal, we need such a tagging and autocategorization template which can be made to take the new category name as a forced perameter, and so generate the 'What links here' link you discuss.
It would seem that this discussion needs some further thrashing out. The old tag suggested the pages were BOT moved back when I first ran across it last summer, or perhaps it was the talk page. Now I'm not sure that is still true. In any event, if Hard Redirects are being used at all, we should for consistancy create a 'R from other category' category and template, and apply it aggressively. Perhaps we should raise this at WP:VPP? // FrankB 18:53, 1 January 2007 (UTC) (Xpost to Carcharoth
- You know, I must confess to having forgotten that I had ever written the above. Thanks for following it up. I'm not that clear on what goes on here, so it would be best to take it to one of the Village pumps if you want wider attention. Hope that helps. Carcharoth 18:55, 1 January 2007 (UTC)
New Bot
I have proposed a new bot to take over the functionality of the old one. It is currently under review from the bot approvals group. Feel free to comment at Wikipedia:Bots/Requests for approval/SelketBot 3. --Selket Talk 21:22, 17 April 2007 (UTC)
hard redirects
ok, after playing around with this for a bit i think i've found the actual brick wall. first of all, i should say it is completely possible to have a category redirect that belongs to the bot maintained category (i.e. Category A redirects to Category B and can also belong to Category:Wikipedia category redirects, showing up correctly labelled as Category A. If an article is added to Category A it displays Category A on its page and can be moved by the bot already maintaining Category:Wikipedia category redirects). The actual problem comes up with trying to implement it with the templates already in use. Neither transclusion nor substing appear to work. The reason is that code like this:
<includeonly>#REDIRECT [[:Category:B]] [[Category:Redirect categories]]</includeonly>
for some reason will generate a newline that's invisible in the edit box. The only way to see it is by looking at "Show changes" with the transcluded text versus you writing it in yourself (or a simpler way is to write the code, transclude it, then "Show changes" after adding subst). The way that the Mediawiki software currently runs is that redirects need to be written on the VERY first line. There are three ways of solving the problem. The first is to develop a way to write the code so the newline isn't being put in. the second is to have a bot do a regex replacement of this template with the physical code - an AWB bot could do it, appending Category:Wikipedia category redirects as well - we would then have two bots running, one to manually replace instances of this template and the other to maintain categories. The third option is to bring it to the attention of the mediawiki software team and ask them to fix this apparent bug. -ΖαππερΝαππερ BabelAlexandria 05:21, 19 June 2007 (UTC)
interwiki links
Should interwiki links appear on the redirect category itself or at the category being used? For example, most other language wikipedias use Category:Fabaceae instead of what we use here: Category:Legumes. Should I move the interwiki links to the Legumes category? And should I place {{nobots}} on the category page to prevent interwiki linkbots from relinking? --Rkitko (talk) 04:22, 1 September 2007 (UTC)
OK, let's discuss
These changes to the template were reverted by User:Eliyak on the grounds that "changes apparently were not discussed; and are probably not such a great idea." OK, so let's discuss. The changes did two things: (1) changed the current garish-looking box to a more standardized message-box format, (2) changed the text to note that most recategorization is done automatically (currently by RussBot). There's no need to encourage users to spend their time doing manual recategorization when it's going to be done automatically anyway. I don't see why either of these should be a big deal, but anyone who wants to comment please do so. --Russ (talk) 13:54, 17 December 2007 (UTC)
- A message template is obviously not intended for bots. It is intended for people to read, and this is one that especially needs to be noticed, so it is quite prominent. Let's not change it on the basis that people will not read it- it is intended only for the people who do read it.
- Also, the template standardization via ambox was only for article templates, not category templates. A seperate process took place for talk page templates. One for category templates never really got off the ground. A reason not to use ambox for categories is precisely this: ambox was designed to make template messages less obtrusive on articles. Categories, however, are more of a back-end side of Wikipedia. This template in particular is especially important to be prominent, since it is to help users avoid the mistake of improper cateorization. If it is not readily apparent that the category does not exist at this apparent location, mistaken categorization there will become increasingly rampant. --Eliyak T·C 22:02, 18 December 2007 (UTC)
- I would suggest that discussion of these changes should realy take place at WikiProject Categories. --Eliyak T·C 22:06, 18 December 2007 (UTC)
- Fine, I'll reply there. --Russ (talk) 00:13, 19 December 2007 (UTC)
- I would suggest that discussion of these changes should realy take place at WikiProject Categories. --Eliyak T·C 22:06, 18 December 2007 (UTC)
Request for comments on template appearance
- I have proposed to revise the appearance of this template due to two concerns. (1) The current template is ugly (in the eyes of this beholder). (2) The text is misleading, as it suggests that users should manually perform a task (recategorization) that is normally performed by a bot. Eliyak has reverted these changes pending further discussion, so I am requesting that interested users comment below. Russ (talk) 19:41, 24 December 2007 (UTC)
- The template currently appears like this:
This category is located at Category:Wikipedia maintenance templates.
Note: This category should be empty.
See the instructions for more information.Administrators: If this category name is unlikely to be entered on new pages, and all incoming links have been cleaned up, click here to delete. |
This template should only be transcluded in the category namespace(s). |
- Alternative 1 would appear like this:
- Alternative 2 would appear like this:
Comments
- I can't choose between the two alternatives to be honest. They are both fresh and appealing and fit the current template fashion. I don't see any reason not to update the aesthetics of the template, it was done once before because someone thought pink was ugly. Hiding T 13:21, 7 January 2008 (UTC)
- Actually, the bold in alternative 2 works better for me, although the colouring and image I don't mind on. Hiding T 13:21, 7 January 2008 (UTC)
- I like the bold and image of the second alternative. It's clear that it's a redirect and not just an informational (and hence ignorable) message. --Kbdank71 21:24, 11 January 2008 (UTC)
- I prefer the bold and the image in the second alternative too. You might consider making the small font a little bigger though (more like the way it is in the original template). Right now, it makes me want to skip over it. Thank you for thinking to update this! LeSnail (talk) 21:39, 11 January 2008 (UTC)
- I prefer the color and image in the first alternative but think both are far superior to the current. I agree with the sentiment that the bold is better than italics and the note should be in a larger font. As far as the explanation that the task is normally done by a bot, I don't think it's strictly necessary but in this case I think more information doesn't hurt. Stardust8212 22:12, 11 January 2008 (UTC)
- This overhaul is long overdue. I have no preference for either one. —Viriditas | Talk 22:20, 11 January 2008 (UTC)
- I'll take alternative two. The current color scheme is horrendously painful. - auburnpilot talk 22:34, 11 January 2008 (UTC)
- Overhaul needed, I like alternative two, and especially prefer the symbol in #2. --Paleorthid (talk) 22:42, 11 January 2008 (UTC)
- I'll take alter 1,I think that is the best choice for redirect template