Template talk:Category redirect
maintenance links |
---|
|
Design
[edit]Who made this so freaking ugly!!!! :/ please prettify again. pfctdayelise (translate?) 03:03, 29 June 2006 (UTC)
Pfctdayelise and I agreed that the color scheme using the pumpkin color was garish and unprofessional. In its present format (border blue, background color light blue (background-color:#e0e0ff), and header color darker blue (#ccccff), the warning is impossible to ignore, but not due to tastelessness. -Mak 08:16, 7 August 2006 (UTC)
When to use?
[edit]I am totally confused by the usage note, which seems to require intimate knowledge of Wikipedia. What is the recommended way to tag a category that you don't want populated? --InfantGorilla 18:24, 26 October 2006 (UTC)
- This is fine. pfctdayelise (说什么?) 13:52, 29 October 2006 (UTC)
Redirect?
[edit]Why can't you make just a simple redirect and have the bots move the pictures? --Botev 08:32, 30 April 2007 (UTC)
- Because if it's a simple redirect, people will keep putting stuff in the wrong cat, and you (ideally) don't want the bots to constantly have to work on this. Superm401 21:00, 10 December 2007 (UTC)
- Actually, I fail to see why the tag {{Category redirect}} should be more efficient in preventing people from putting the stuff into the wrong category than the #redirect command is. Both clearly indicate that one category name is preferred and should be used while the other isn't preferred and should be avoided. --Botev 22:08, 10 December 2007 (UTC)
- Either the cats should be read only or there should be a bot which changes the cats in the meda from time to time. There must be a solution, the situation now is more than unhappy.--Avron 07:54, 3 March 2008 (UTC)
- Well, {{Category redirect}} does have the advantage of standing out more to the user. But mainly, I think the software should handle plain category #redirects better. Superm401 - Talk 10:22, 13 April 2008 (UTC)
- Actually, I fail to see why the tag {{Category redirect}} should be more efficient in preventing people from putting the stuff into the wrong category than the #redirect command is. Both clearly indicate that one category name is preferred and should be used while the other isn't preferred and should be avoided. --Botev 22:08, 10 December 2007 (UTC)
- I totally oppose to this "solution", it makes life at Wikimedia Commons harder. In Germany we call that "Warum einfach, wenn es auch kompliziert geht?" —→ #redirect category... is much easier and it saves that extra click (if you're working with categories the whole day, it get's annoying). I'm wondering if all that Bots do that right. Do they act upon any convention referring to this topic? --Mattes (talk) 06:06, 7 October 2008 (UTC)
- People tend not to notice the little "Redirected from..." in the corner, which means they keep putting things in the wrong category. Superm401 - Talk 01:40, 11 October 2008 (UTC)
- I totally oppose to this "solution", it makes life at Wikimedia Commons harder. In Germany we call that "Warum einfach, wenn es auch kompliziert geht?" —→ #redirect category... is much easier and it saves that extra click (if you're working with categories the whole day, it get's annoying). I'm wondering if all that Bots do that right. Do they act upon any convention referring to this topic? --Mattes (talk) 06:06, 7 October 2008 (UTC)
Link to Template:Bad name?
[edit]Hello, why this template links to template Template:Bad name? It is intended for files only, isn't it? --Martin Kozák 23:29, 25 May 2007 (UTC)
- This has been changed to point to Template:Duplicate. However, this template isn't intended for cats either. Superm401 - Talk 10:22, 13 April 2008 (UTC)
- I'm planning to make a {{Bad cat name}} tailored towards badly named cats no one else is likely to use. It will read something like:
- This category has an incorrect name, which is unlikely to be used in the future. The correct category is Category:newname. All items in this category should be recategorized in Category:newname, then this category should be deleted.
- Superm401 - Talk 08:51, 17 April 2008 (UTC)
- I'm planning to make a {{Bad cat name}} tailored towards badly named cats no one else is likely to use. It will read something like:
- I think, you misinterpreted "Category redirect" - main intention was, to redirect local-interwiki habits to our commons habits: it is to tell where a specific category is to find here, not that its got a "bad name" (as missing plular form) but that there is no sense to "duplicate" categories under different names --W!B: 09:26, 18 April 2008 (UTC)
- I know {{Category redirect}} isn't for "bad names". However, the template currently says, "misspellings unlikely to be used by other people" should have {{Duplicate}}. But Template:duplicate is meant for images, not cats. I'm proposing we make Template:bad cat name, and mention it here in place of duplicate. Superm401 - Talk 17:36, 20 April 2008 (UTC)
- ah I understand, You're right, but woudn't it be easier to adjust Template:duplicate to fit on *all media* (not only images, but sounds, ..) including cats - as we do not separate deleting media and categories, there is no use separating deletion tags (see Commons:Deletion guidelines#Categories
- Category redirect is different, because it implies expicitely to keep that name of a cat, but not to fill it with contents.. a case not appearing with media-files.. --W!B: 20:11, 21 April 2008 (UTC)
- I think creating a new template is better in this case. That way, there's a perfect fit for the situation. I've mentioned this discussion at Template_talk:Duplicate#Template:Duplicate_and_redundant_categories. Superm401 - Talk 22:26, 24 April 2008 (UTC)
- I know {{Category redirect}} isn't for "bad names". However, the template currently says, "misspellings unlikely to be used by other people" should have {{Duplicate}}. But Template:duplicate is meant for images, not cats. I'm proposing we make Template:bad cat name, and mention it here in place of duplicate. Superm401 - Talk 17:36, 20 April 2008 (UTC)
- I think, you misinterpreted "Category redirect" - main intention was, to redirect local-interwiki habits to our commons habits: it is to tell where a specific category is to find here, not that its got a "bad name" (as missing plular form) but that there is no sense to "duplicate" categories under different names --W!B: 09:26, 18 April 2008 (UTC)
Extra colon in link to category when bad name should be used
[edit]Hi, Could an admin correct {{bad name|:Category:correct category name}} into {{bad name|Category:correct category name}} Thank you, -- Slaunger (talk) 20:49, 29 July 2008 (UTC)
Done Thanks. Rocket000 (talk) 23:14, 5 August 2008 (UTC)
Wording
[edit]Greetings,
This is a very helpful template.
Part of its wording reads "This tag should be used on existing categories that are likely to be used by other editors, even though the "real" category is elsewhere.". That wording implies to me "...used and left on existing categories...".
If that is correct then the wording should be amended to more precisely reflect the intent.
It is certainly true that in many cases it is advantageous to keep empty redirects with this template in them as they can often:
- be an aid to finding the correct category for a file
- provide a warning that an apparently "obvious" category is not in fact the correct (consensus) one.
-Arb. (talk) 17:02, 21 August 2008 (UTC)
As you can see in the discussion on User_talk:Rocket000#.7B.7Bcategory_redirect.7D.7D, some folks find redirects evil and they are indeed a nightmare in terms of system management, learn bad habits to the users and give sometimes wrong information to the users. I plan to user a wider debate on the problematic within a couple of days. --Foroa (talk) 17:37, 21 August 2008 (UTC)--Foroa (talk) 17:37, 21 August 2008 (UTC)
New idea
[edit]There's some recent talk about cleaning up empty categories. These have been piling up thanks to this template. Well, soft category redirects in general (and disambig cats). They make Special:UnusedCategories kinda useless. I was thinking of ways to make the software not think these are empty like it does for real redirects. At first i thought of simply adding a random page to every redirected category. Easy to do (just paste a list of categories on some page), but that wouldn't be pretty. I thought of a way to "trick" the software into thinking they were hard redirects (the pages would start with #REDIRECT but intentionally be broken and hidden with CSS) but that's also messy and would ruin our other lists. So here's my idea: let's have this template categorize the categories in themselves. It makes them no longer empty and doesn't interfere with the real categories. To keep them being considered empty to us, we would make the template check for {{PAGESINCAT}} > 1 instead of {{PAGESINCAT}} != 0. Should we try it? Rocket000(talk) 23:42, 4 September 2008 (UTC)
- It would be better to change Special:UnusedCategories not to count categories that are in Category:Category redirects, but this is a decent interim solution. Superm401 - Talk 04:48, 5 September 2008 (UTC)
- Of course, that would be ideal but I doubt that will happen since there would have to be a change in the MediaWiki software itself and Category:Category redirects is just a normal user-created category. If there was a software solution, it would most likely a magic word or something we add to any page to have it stay out of the relevant maintenance report(s). Rocket000(talk) 08:54, 5 September 2008 (UTC)
Change of 17 04 2009
[edit]When looking in Category:Glacier, the latest change did not bring much relief. --Foroa (talk) 06:28, 17 April 2009 (UTC)
- It wasn't intended to fix that not empty bug. It was to clear the unused category report. Rocket000 (talk) 06:47, 17 April 2009 (UTC)
- Your test with glacier failed because Hotcat dynamically changed the redirected cat. I just did a test, and one has to add & remove an item to the redirected cat and then perform a dummy edit (dummy edits are not realy necessary: the redirect bots seem to do that every night or so). In terms of unused cats, you'll have to look for a solution for unidentified objects that should remain, as empty as possible. --Foroa (talk) 06:59, 17 April 2009 (UTC)
- Yeah, I forgot about that, but I removed the template while I did it the second time. What do you mean "for unidentified objects that should remain, as empty as possible"? Rocket000 (talk) 07:08, 17 April 2009 (UTC)
- The standard naming of categories for unidentified people, plants, ... is "unidentified ..." Category:Unidentified subjects. Those hundreds of categories should be remain as empty as possible, so please no deletion because it is empty.
- This User:RussBot/category_redirect_log will not like the newer version and needs two hours more time to do its daily job. (and the recursive cat is quite confusing) --Foroa (talk) 12:12, 17 April 2009 (UTC)
- Yes I know about the naming convention but I still don't see why that has anything to do with what I did. They "should remain, as empty as possible". So should any other category redirect. What makes those special? Anyway, I changed the template from checking {{PAGESINCAT}}≠0 to {{PAGESINCAT}}>1 to determine if it's empty. If templates can do it, bots can certainly be programed to do it. It may be confusing at first, but these are redirects, the normal user shouldn't see them that much. Rocket000 (talk) 20:35, 17 April 2009 (UTC)
- Ok, I'm planning on undoing it as soon as we get the next update to Special:UnusedCategories because it is a ugly hack. Rocket000 (talk) 20:53, 17 April 2009 (UTC)
- And that didn't even give us a full list. Why do we have so many empty categories? Rocket000 (talk) 08:53, 19 April 2009 (UTC)
- Personally, I have no problems with empty categories anymore because people see now when they are empty and tend to speedy them if they are really useless. I prefer to have "professionally" made empty categories than categories that are created on a as needed base but without all the right links to other categories. Further tests with glaciers show that if the counts shows 1F, you have to add and remove an image before the problem go away: adding and removing something else don't seem to reset the counter. --Foroa (talk) 17:34, 20 April 2009 (UTC)
- That is weird. I wonder why it only work for images? I agree not all (or most) empty categories should be deleted, but there are tons that should be (the non-professionally made ones, ones unlikely to ever be used). I tend to keep any that are part of a larger category system such as species or places (especially if they have some template like on Category:History of Saint Martin (France)). These are likely to eventually be used; they are just waiting for images. Rocket000 (talk) 17:48, 20 April 2009 (UTC)
- Further tests show that a corrupted category counter (in my test cases the image counter) is only corrected when the category is displayed AND the display contains one or more images (I guess the same would be true for galleries and categories but I have no test case). When no display is activated when images (or other stuff) are getting in and out the category, the counter is not corrected. --Foroa (talk) 05:57, 21 April 2009 (UTC)
- That is weird. I wonder why it only work for images? I agree not all (or most) empty categories should be deleted, but there are tons that should be (the non-professionally made ones, ones unlikely to ever be used). I tend to keep any that are part of a larger category system such as species or places (especially if they have some template like on Category:History of Saint Martin (France)). These are likely to eventually be used; they are just waiting for images. Rocket000 (talk) 17:48, 20 April 2009 (UTC)
- Personally, I have no problems with empty categories anymore because people see now when they are empty and tend to speedy them if they are really useless. I prefer to have "professionally" made empty categories than categories that are created on a as needed base but without all the right links to other categories. Further tests with glaciers show that if the counts shows 1F, you have to add and remove an image before the problem go away: adding and removing something else don't seem to reset the counter. --Foroa (talk) 17:34, 20 April 2009 (UTC)
- And that didn't even give us a full list. Why do we have so many empty categories? Rocket000 (talk) 08:53, 19 April 2009 (UTC)
- Ok, I'm planning on undoing it as soon as we get the next update to Special:UnusedCategories because it is a ugly hack. Rocket000 (talk) 20:53, 17 April 2009 (UTC)
- Yes I know about the naming convention but I still don't see why that has anything to do with what I did. They "should remain, as empty as possible". So should any other category redirect. What makes those special? Anyway, I changed the template from checking {{PAGESINCAT}}≠0 to {{PAGESINCAT}}>1 to determine if it's empty. If templates can do it, bots can certainly be programed to do it. It may be confusing at first, but these are redirects, the normal user shouldn't see them that much. Rocket000 (talk) 20:35, 17 April 2009 (UTC)
- Yeah, I forgot about that, but I removed the template while I did it the second time. What do you mean "for unidentified objects that should remain, as empty as possible"? Rocket000 (talk) 07:08, 17 April 2009 (UTC)
- Your test with glacier failed because Hotcat dynamically changed the redirected cat. I just did a test, and one has to add & remove an item to the redirected cat and then perform a dummy edit (dummy edits are not realy necessary: the redirect bots seem to do that every night or so). In terms of unused cats, you'll have to look for a solution for unidentified objects that should remain, as empty as possible. --Foroa (talk) 06:59, 17 April 2009 (UTC)
__NOINDEX__
[edit]I would like to discuss the addition of __NOINDEX__ to this template. I believe that this should help our own search engines to not show the categories as a prime search result. -- billinghurst (talk) 01:05, 26 September 2009 (UTC)
- Why? That's one of the main reasons we have these redirects—so people can find the right category when they search for an alternate term. Unlike Wikipedia, our categories are sometimes just as important or even more important than our so-called mainspace. Rocket000 (talk) 03:20, 26 September 2009 (UTC)
- Hmm, though some should not be seen by a search engine, especially some of the plurals, eg. Maltese Cross search. Maybe there can be an extra piped option to NOINDEX specific cases. -- billinghurst (talk) 04:28, 26 September 2009 (UTC)
- You're right. Anything the search engine can account for (such as singular vs. plural) shouldn't show up. I was thinking more of things like this. NOINDEX only affects external searches like Google. MediaWiki's will always work the same (which is a good thing if you think about it, something needs to search everything). Rocket000 (talk) 05:22, 26 September 2009 (UTC)
- So it would be possible to have an additional piped option
|noindex
? -- billinghurst (talk) 05:50, 26 September 2009 (UTC)- Well, I'm of the opinion that Google was meant to search the whole Internet, so let it. I just don't see the benefit. More information can't hurt, but less can. Besides, that a lot of work anyway. Why not manually add __NOINDEX__ to the pages? Rocket000 (talk) 10:35, 26 September 2009 (UTC)
- So it would be possible to have an additional piped option
- You're right. Anything the search engine can account for (such as singular vs. plural) shouldn't show up. I was thinking more of things like this. NOINDEX only affects external searches like Google. MediaWiki's will always work the same (which is a good thing if you think about it, something needs to search everything). Rocket000 (talk) 05:22, 26 September 2009 (UTC)
- Hmm, though some should not be seen by a search engine, especially some of the plurals, eg. Maltese Cross search. Maybe there can be an extra piped option to NOINDEX specific cases. -- billinghurst (talk) 04:28, 26 September 2009 (UTC)
Useless category redirects should be deleted. All others should be indexed. -- User:Docu at 10:44, 26 September 2009 (UTC)
Problems with apostrophe ?
[edit]Category:L'Art de Vivre and Category:L'Impressionniste show always empty. --Foroa (talk) 12:41, 20 November 2009 (UTC)
- Temporary glitch? Seems to be working fine. Rocket000 (talk) 04:44, 3 December 2009 (UTC)
- I've put back an image in Category:L'Impressionniste. There must be something wrong with the aphostrophe but I think that Russbott will detect it. --Foroa (talk) 07:46, 3 December 2009 (UTC)
- Hmm, I'll investigate. Rocket000 (talk) 09:48, 3 December 2009 (UTC)
- It's because the page name is appearing as L'Impressionniste to the {{PAGESINCAT:}}. I have no idea why. Rocket000 (talk) 10:01, 3 December 2009 (UTC)
- Hmm, I'll investigate. Rocket000 (talk) 09:48, 3 December 2009 (UTC)
Protected edit request
[edit]{{Editprotected}} Please undo this edit to Template:Category_redirect/en, per Administrators' noticeboard/User problems#Foroa. -- User:Docu at 23:16, 14 December 2009 (UTC)
Not done. The change was correct. Multichill (talk) 15:18, 1 January 2010 (UTC)
Isuue
[edit]Why isn't this template working anymore? It's not redirecting to anywheres else. See it's related links. Mizunoryu 大熊猫❤小熊猫 (talk) 14:25, 5 May 2010 (UTC)
Categorizing of non-empty redirects
[edit]{{editprotected}} I propose to categorize non-empty redirects automatically under the goal category. Reason: when some un-emptied category is labelled as "seecat" or when somebody insert some file into redirected category, such files needlessly become unavailable for many days (often for weeks) and disappear from the category structure.
I propose to replace
[[Category:Non-empty category redirects]]
with
[[Category:Non-empty category redirects]] [[Category:{{{1}}}|~]]
in order to categorize non-empty redirect just for the time when it is non-empty. (However, an effect will be weeks delayed because of permanent job queue crowding.)--ŠJů (talk) 14:40, 7 October 2010 (UTC)
- Sounds good. Docu at 17:04, 7 October 2010 (UTC)
Done --Mormegil (talk) 09:12, 10 October 2010 (UTC)
- Cool feature, but could you replace [[Category:{{{1}}}|~]] by [[Category:{{{1}}}|~{{PAGENAME}}]] ?
- Because the current ordering does not respect the category name.
- Cheers Liné1 (talk) 15:04, 5 November 2010 (UTC)
- Cool feature, but could you replace [[Category:{{{1}}}|~]] by [[Category:{{{1}}}|~{{PAGENAME}}]] ?
Categorization of non-empty category redirect fails
[edit]{{editprotected}}
Due a bug, categorizing into Category:Non-empty category redirects is not updated properly and files or subcategories from redirects is not moved the new categories by bot. See Commons:Village pump#Categorization by variables in the template. As long as this bug will be not resolved, it's needed to make an empty (pretended) edit of this template periodically to induce automatic review (updating) of categorization. --ŠJů (talk) 20:23, 20 April 2012 (UTC)
- No fundamental problem, I dummy edit (only edit + save, no need to change anything) this template once or twice a day. --Foroa (talk) 15:44, 21 April 2012 (UTC)
Not done There is nothing wrong with the template (or, rather, there is no edit to the template which would resolve the stated issue). --Mormegil (talk) 10:28, 24 May 2012 (UTC)
Categorization allowed ?
[edit]Hello. Do redirected categories allow categorizations ? See Category:Escaut and history of June 3rd and 4th 2011 (Escaut is the French name of Category:Scheldt and should appear in Category:Rivers of France by name as is). Any other solution would be not satisfying (e.g. creating an empty category, just because of the name; and Scheldt is Escaut). Jack ma (talk) 09:08, 1 June 2012 (UTC)
- In the {{Category redirect}} template, it is mentioned: "Redirected categories should be empty and not categorised themselves." In Commons:Rename a category as well. This is an unfortunate consequence of a single (language) unique category name. In many countries, items have 3 to 5 different names. Categorizing the "translations" creates too much confusion and people move categories all the time because they find that the other official name in the categories are much better. Very often, they add subcategories to the redirected categories with the "better" naming convention. Concerning rivers, we notice that many rivers change name from one country to another, but it remains a problem and only hat notes and galleries alleviate the problem. --Foroa (talk) 13:44, 1 June 2012 (UTC)
- I don't see where the problem exactly is if category redirects are categorized. On wiki:fr(or :en), categorized redirects are used to categorize the category name (before the redirection); e.g. here or en:Category:Former named state highways in Oregon where categorized redirections appear in italic. The message of the template is clear enough: this category should be empty (like all redirections), so no risk of confusion (BTW, in the French message, "... and not categorised themselves" is not translated). Jack ma (talk) 14:11, 1 June 2012 (UTC)
- Your examples concern articles (galleries) for redirects that really work and redirect immediately. On most wikipedias, category redirects are very much restricted, sometimes completely forbidden, let alone their independent categorisation. Moreover, redirected categories don't appear in italic and show a big empty, which is confusing and makes it very tempting for people to redirect to it. --Foroa (talk) 14:33, 1 June 2012 (UTC)
- Ok then. Category:Escaut is fully redirected (with no category), and Escaut is a redirected gallery (italic, in Category:Rivers of France by name). Thanks, Jack ma (talk) 05:01, 3 June 2012 (UTC)
- Thank you, sorry about that, I wished we could do better. --Foroa (talk) 07:34, 3 June 2012 (UTC)
- Ok then. Category:Escaut is fully redirected (with no category), and Escaut is a redirected gallery (italic, in Category:Rivers of France by name). Thanks, Jack ma (talk) 05:01, 3 June 2012 (UTC)
- Your examples concern articles (galleries) for redirects that really work and redirect immediately. On most wikipedias, category redirects are very much restricted, sometimes completely forbidden, let alone their independent categorisation. Moreover, redirected categories don't appear in italic and show a big empty, which is confusing and makes it very tempting for people to redirect to it. --Foroa (talk) 14:33, 1 June 2012 (UTC)
- I don't see where the problem exactly is if category redirects are categorized. On wiki:fr(or :en), categorized redirects are used to categorize the category name (before the redirection); e.g. here or en:Category:Former named state highways in Oregon where categorized redirections appear in italic. The message of the template is clear enough: this category should be empty (like all redirections), so no risk of confusion (BTW, in the French message, "... and not categorised themselves" is not translated). Jack ma (talk) 14:11, 1 June 2012 (UTC)
- In the {{Category redirect}} template, it is mentioned: "Redirected categories should be empty and not categorised themselves." In Commons:Rename a category as well. This is an unfortunate consequence of a single (language) unique category name. In many countries, items have 3 to 5 different names. Categorizing the "translations" creates too much confusion and people move categories all the time because they find that the other official name in the categories are much better. Very often, they add subcategories to the redirected categories with the "better" naming convention. Concerning rivers, we notice that many rivers change name from one country to another, but it remains a problem and only hat notes and galleries alleviate the problem. --Foroa (talk) 13:44, 1 June 2012 (UTC)
Probem since 5 July 2012: template loop
[edit]When used in a file, reports a template loop. Should clearly display a red box warning when used outside category space. For galleries redirecting to categories, it should suggest the proper normal redirect syntax, by preference copy/pastable. --Foroa (talk) 08:53, 6 July 2012 (UTC)
- You are right, the behavior in files is strange: it includes the category in the file!
- Displaying a red "Category redirect should not be used in files" would be better.
- By the way, why does this template work in namespaces Template and Commons ?
- Cheers 07:15, 7 July 2012 (UTC)
- I cannot see any loop in files, how do you get that ? I do not see any reason why anyone would use a category redirect directly in a file, and if she does, the file will be categorized accordingly anyway, so I am not sure that any additional error-checking is needed. But it should be easily fixable with a "iferror" or a "ifexist".
- The template works in the Template namespace to help with documentation. It works in the Commons namespace because it is used there. --Zolo (talk) 05:31, 11 July 2012 (UTC)
- Being correctly categorized doesn't make it okay to use a template completely inappropriately. For so many reasons. If anyone does use it on a file page, it's obviously a mistake, and we should let them know (although without any evidence people are actually doing this, I don't think it's necessary). The template displayed correctly on Template and Commons (example pages) before your changes, except it didn't add any categories... Rocket000 (talk) 05:47, 11 July 2012 (UTC)
- Template generates loop error when used in gallery and file name space, probably in some other name spaces too. --Foroa (talk) 05:51, 11 July 2012 (UTC)
- I remove several uses per week in gallery name space: would be nice if template would suggest to use standard #REDIRECTCategory:destination, especially the colon preceding the category. --Foroa (talk) 05:55, 11 July 2012 (UTC)
- I really don't think that standard #REDIRECT is a good idea. The current template is much more powerful. Liné1 (talk) 06:05, 11 July 2012 (UTC)
- @Rocket: The idea of the namespace switch was to prevent {{Object photo}} from being broken by redirects. Object photo transcludes content from categories, which obviously poses problems but sounds acceptable (see for instance Commons:VP#Template:Object_photo)
- @Liné: I do not think the idea was to remove {{Category redirect}} completely (the template is indeed needed though I cannot help but think that there should be a better way to get the same result, as apparently, all redirected categoryies should use category redirect).
- @ Foroa:
- I tried to generate loops here but did not get any.
- I added a custom message for the gallery namespace, better ? Maybe user:SieBot could help maintaining that ? --Zolo (talk) 06:18, 11 July 2012 (UTC)
- Gallery name space OK, thank you. {http://commons.wikimedia.org/w/index.php?title=File:1818_map_of_York,_Upper_Canada.jpg&diff=74098515&oldid=74098096 Still template loop in file space]. --Foroa (talk) 06:49, 11 July 2012 (UTC)
- Ok, it seems to be only when the category redirect points to a redirect, I do not see any straightforward way to fix it. Is it really bad ? Category redirects on files, should not occur very frequently I guess. --Zolo (talk) 09:12, 11 July 2012 (UTC)
- It seem to happen to all cat redirects in files. Not a real problem, it happens only a couple of times per month, and the more red messages it generates, the better ... It doesn't catch the case neither where a redirected cat is included in curly brackets in stead of square brackets, as happens occasionally. --Foroa (talk) 09:24, 11 July 2012 (UTC)
- Ok, it seems to be only when the category redirect points to a redirect, I do not see any straightforward way to fix it. Is it really bad ? Category redirects on files, should not occur very frequently I guess. --Zolo (talk) 09:12, 11 July 2012 (UTC)
- Gallery name space OK, thank you. {http://commons.wikimedia.org/w/index.php?title=File:1818_map_of_York,_Upper_Canada.jpg&diff=74098515&oldid=74098096 Still template loop in file space]. --Foroa (talk) 06:49, 11 July 2012 (UTC)
- I really don't think that standard #REDIRECT is a good idea. The current template is much more powerful. Liné1 (talk) 06:05, 11 July 2012 (UTC)
- Being correctly categorized doesn't make it okay to use a template completely inappropriately. For so many reasons. If anyone does use it on a file page, it's obviously a mistake, and we should let them know (although without any evidence people are actually doing this, I don't think it's necessary). The template displayed correctly on Template and Commons (example pages) before your changes, except it didn't add any categories... Rocket000 (talk) 05:47, 11 July 2012 (UTC)
- Guys, we all know what does the loop: it is the |#default = {{Category:{{{1|}}}}}
- Foroa uses {{Category redirect|Root}} were Category:Root contains {{Category redirect|CommonsRoot}}<nowiki> :Zolo solution with <nowiki>{{error}} will solve that.
- Cheers Liné1 (talk) 16:47, 11 July 2012 (UTC)
- Zolo, could you replace {{Category:{{{1|}}}}} with your {{Error}} ? Liné1 (talk) 17:00, 11 July 2012 (UTC)
- In cases I have tried, there does not seem to be any loop problem. If content is transcluded from a category, and the category is renamed, it is unlikely that the renamer will notice the error message in files. In that case, I think that transcluding the category is better than an error message, as it will appear correctly for the end user. --Zolo (talk) 17:21, 11 July 2012 (UTC)
- Zolo, could you replace {{Category:{{{1|}}}}} with your {{Error}} ? Liné1 (talk) 17:00, 11 July 2012 (UTC)
The real problem is that you are transcluding entire categories on file pages. This will cause infinite problems. There's all kinds of category content, not just templates and categories, that should never be added to other pages automatically, especially not of file pages (the gallery/category content exchange is one thing and possibly workable, but this is on a whole different level). People editing a category shouldn't have to worry about what they're adding being reused (automatically) for an entirely different purpose. Categories are not templates, please don't use them like they are. There's very little benefit of transcluding the category text anyway. Image descriptions should be about the image, not the broader topical category it falls. It makes me cringe every time I see a whole taxonomic hierarchy on images of species. Too much information. If people care about that, they are not going to pick random image to tell them that. That's what categories, galleries, and interwikis are for. Rocket000 (talk) 20:48, 11 July 2012 (UTC)
- you just introduced a small bug: [http://commons.wikimedia.org/w/index.php?title=Template:Category_redirect/sandbox&diff=prev&oldid=74139664
- I am not sure that Namespace "Gallery" exists. I think that gallery have an empty namespace.
- We all know that the solution is this: killing the {{{Category:{{{1}}}}}}
- Cheers Liné1 (talk) 06:21, 12 July 2012 (UTC)
- Rocket, I tend to agree wtih you for images of species, but {{Object photo}} is used for images of artworks, and there seems to be a consensus for having the whole artwork description on the image page (we still do not have any better solution). It transcludes pages using {{Category definition: Object}}, wrapped within "onlyinclude" so that tools like hotcat still work properly. It is sure not ideal, but so far I have not encountered many problems with that (except for the annoying problems associated with category renaming). --Zolo (talk) 07:43, 12 July 2012 (UTC)
- It will cause problems and will continue to do no matter how many workarounds you crate. I guarantee it. Just think about it. If that really is the consensus, I suggest copy and pasting the info instead (maybe that will help show how unnecessary it is to duplicate content multiple times). Rocket000 (talk) 04:27, 15 July 2012 (UTC)
Documentation in SubPage request
[edit]Could an administrator move the documentation in a subpage like in {{ADW}} ? You simply need to copy the text of [1] in the template text.
I already created the documentation as a subpage.
Thanks Liné1 (talk) 06:53, 7 July 2012 (UTC)
- You forgot the </noinclude> ;-) Liné1 (talk) 17:27, 10 July 2012 (UTC)
Category:Bad use of Template:Category redirect
[edit]When used in incorrect namespaces, Category:Bad use of Template:Category redirect was added.
I liked it and would have like to create other Category:Bad use of Template:XXXXXXXXXX
Since Foroa modification, Category:Broken category redirects is added which is meant for "Redirects to self or non-existent pages", not "bad usage".
I prefer the previous situation.
Best regards Liné1 (talk) 06:21, 7 July 2012 (UTC)
- I added that to broken redirects as in general, the items in the Category:Broken category redirects category are corrected in less than 24 hours, which seems better than keeping it hanging around in a non maintained category. --Foroa (talk) 09:12, 9 July 2012 (UTC)
- That's a good argument for sure ;-)
- Also it is documented in Category:Broken category redirects (See Sortkeys: - = not the category namespace.)
- OK, fine for me, I buy it.
- Cheers Liné1 (talk) 14:30, 9 July 2012 (UTC)
Use in other namespaces
[edit]What is the purpose of namespace switch? This doesn't make sense outside the category namespace... and why does #default (every namespace besides Category, Template, and Commons) result in transcluding the whole category it links to ({{Category:{{{1|}}}}}, while also tagging it as broken)? Rocket000 (talk) 23:47, 9 July 2012 (UTC)
- →Template_talk:Category_redirect#Probem_since_5_July_2012:_template_loop -Rocket000 (talk) 05:49, 11 July 2012 (UTC)
This template is no longer necessary
[edit]Redirected categories (if using hard redirect #REDIRECT) will be in italics at the bottom of files. So people will be able to know that they are categorizing incorrectly into a redirected category. But this will only work when using hard redirects: #REDIRECT.
So when the italics start showing up for redirected categories we need to stop using this template, and mark it as "deprecated". See Bugzilla:5346 - "make category redirects appear as italics or different colored links." It seems that redirects will now be in italics. Read the comments at the bottom of the bug thread. It talks about Gerrit change #40781. I don't know how long it will take for that to show up here on the Commons though.
For more discussion see the redirect discussions currently at Commons:Administrators' noticeboard, or search for "redirects" in the archives once the discussions are moved there.
Russbot periodically moves files from redirected categories on the Commons to the correct category. See: User:RussBot. That page says "This bot will periodically clean out Category:Non-empty category redirects by moving the contents of redirected categories into their corresponding new categories."
R'n'B, the maintainer of RussBot, writes: "If there were a consensus to use hard redirects, the bot could handle that (with some work to adapt it)." See User talk:R'n'B#Hard redirects of category names. --Timeshifter (talk) 13:46, 28 December 2012 (UTC)
- Even if there is no consensus to use hard redirects, RussBot can already be modified to move files from hard redirect categories to destiantion categories. Cheers Liné1 (talk) 17:10, 28 December 2012 (UTC)
- Template {{Category redirect}} can only be removed when hard redirects are extensively tested with all tools, especially with items "hanging" in redirected categories. A special non empty category redirects for such cases will be needed. Categories that are included through templates can often not be moved by bots. --Foroa (talk) 18:09, 28 December 2012 (UTC)
- See redirect discussions at Commons:Administrators' noticeboard. --Timeshifter (talk) 01:24, 29 December 2012 (UTC)
- Those discussions have been moved here:
- Commons:Requests for comment/Hard category redirects REDIRECT --Timeshifter (talk) 12:18, 2 January 2013 (UTC)
- See redirect discussions at Commons:Administrators' noticeboard. --Timeshifter (talk) 01:24, 29 December 2012 (UTC)
- Template {{Category redirect}} can only be removed when hard redirects are extensively tested with all tools, especially with items "hanging" in redirected categories. A special non empty category redirects for such cases will be needed. Categories that are included through templates can often not be moved by bots. --Foroa (talk) 18:09, 28 December 2012 (UTC)
Problem to redirect Category:21st-century_years_by_country
[edit]21st-century_years_by_country has been replaced but it is impossible to transfer the subcategories, since the cat. in written in a template…
I tried to change the template, but it did not work… if someone can do the necessary work, thank you
And Happy New Year (a little in advance) --Hsarrazin (talk) 14:38, 31 December 2012 (UTC)
No errors if no parameters are specified
[edit]If the template is used without any parameters, the template does not show any error messages.
If you just put {{Category redirect}}
, the template will say This category can be found at [[:Category:]], instead of telling the user that the first parameter MUST be set. -abbedabbdisk 07:53, 9 October 2014 (UTC)
MediaWiki bug (and solution): missing detection of some non-empty redirected categories
[edit]The following test in this template:
-->{{#ifexpr:{{PAGESINCAT:{{PAGENAME}}|R}}>0<!--
still does not work when the page name (the category name) contains some characters, notably the apostrophe-quote (') which is very common in page names and category names, and also ampsersands (&), sometimes double-quotes (").
This is a known (very old) bug of MediaWiki (already reported a long time ago and commented, but still not solved):
- The result of
{{PAGENAME}}
is HTML-encoded (e.g. an apostrophe-quote in the page name is returned as'
or'
). - But
{{PAGESINCAT:...}}
still cannot process a category name in its first parameter if it is HTML-encoded (it does not find the category given this incorrect name !).
As a result, when redirecting a category whose name contains some characters (apostrophe-quote, ampersand, ...) and that still contains files, this template will never detect that the category still contains files, and so that renamed category is NOT listed as a subcategory of the new category: these files become uncategorized. And the renamed category is not listed within the category listing all non-empty redirected categories.
Notes:
- The problem is in
{{PAGENAME}}
(and all similar builtin magic keywords such as{{SUBPAGENAME}}
or{{FULLPAGENAME}}
and even{{NAMESPACE}}
on some wikis where namespace names may also contain some sensitive characters such as the apostrophe-quote) that should have never been HTML-encoded (this is made too early by these magic keywords, the HTML-encoding is not to be made during template/parserfunction expansion but during the last parsing step that converts the expanded content to HTML. But it can probably not be changed now (some other tricky templates are expecting that{{PAGENAME}}
is HTML-encoded in order to detect if they contain some characters (they can test it by comparing substrings). These magic keywords are clearly inconsistant ! - The
{{#ifeq:}}
and{{#switch:}}
parser functions are not affected by the bug of PAGENAME, because they contain a workaround that allows to return a successful match when comparing a non-HTML-encocoded litteral string in the wiki code, with a second parameter which may be HTML-encoded at the wrong step (by PAGENAME keyword). But this workaround also has its own problems because now it will match if a page is ever named with a litteral ampersand (yes the pagename C&O is legal for MediaWiki !) with some other code that parse characters or substrings. {{PAGESINCAT:}}
could also implement the same HTL-decoding workaround used in{{#ifeq:}}
and{{#switch:}}
for their input parameters.- Note also that there's still no raw option parameter in
{{PAGENAME|...}}
whose first parameter can also be a litteral string... that will also be HTML-encoded even if it is not so in the litteral wiki code, such as{{PAGENAME|C&O}}
which actually does NOT return "C&O" but "C&O" or "C&O", or such as{{PAGENAME|Côte-d'Or}}
which actually does NOT return "Côte-d'Or" but "Côte-d'Or" or "Côte-d'Or").
Solution:
You should HTML-decode {{PAGENAME}}
by replacing it by {{#titleparts:{{PAGENAME}}}}
in this template:
-->{{#ifexpr:{{PAGESINCAT:{{#titleparts:{{PAGENAME}}}}|R}}>0<!--
The fixed version is in the current version (by me today) of its /sandbox subpage.
Proof:
{{#titleparts:...}}
performs the HTML-decoding internally in its first stage (so "Côte-d'Or" will become back "Côte-d'Or", which now can be tested with{{PAGESINCAT:...}}
).{{PAGESINCAT:Côte-d'Or}}
works as expected and returns "22" because there's still no HTML-encoding (the litteral parameter is just UTF-8 encoded in the wiki code).{{PAGESINCAT:{{PAGENAME:Category:Côte-d'Or}}}}
does not work correctly, it returns "0" (PAGESINCAT does not find any category litterally named "Côte-d'Or" or "Côte-d'Or").{{PAGESINCAT:{{#titleparts:{{PAGENAME:Category:Côte-d'Or}}}}}}
works again, it returns "22". Details:{{PAGENAME:Category:Côte-d'Or}}
returns "Côte-d'Or" which seems correct here (but it is HTML-encoded, and MediaWiki parser will not change it, the HTML-decoding is supposed to have already occured in the 1st stage of parsing the litteral input wiki code, and it will perform the rest of the expansion, it will never reencode it in later stages, but only eventually in the last stage that generates the visible HTML code, for example to HTML-encode the visible ampersands, or lower-than signs);{{#titleparts:{{PAGENAME:Category:Côte-d'Or}}}}
returns "Côte-d'Or" which is correct (not HTML-encoded, this is performed only on the last stage by MediaWiki when generating the viewed HTML page).
- Additionally after checking if it contains a namespace name, which is stripped,
{{#titleparts:...}}
enforces the result into into a valid pagename and canonicalizes it:- it resolves the relative "../" litteral shortcuts, resolving also "/subpage" by prepending the name of the current page for its missing missing base page); then, if there are two other parameters, it will select the numbered segments separated by "/" to return only those;
- then it converts the 1st letter to capital (according to the settings of namespace in the the local wiki)... but it does not HTML-encodes the result, as expected.
- All this additional work by
{{#titleparts:...}}
is safe here, as we already have a canonical pagename returned by{{PAGENAME}}
(except it is incorrectly HTML-encoded).
verdy_p (talk) 11:25, 8 February 2015 (UTC)
- That template is also used indirectly by very few derived templates (with minor use such as Template:Endashcatredirect which will continue to work unchanged).
- There may be other templates having exactly the same problem (those used to track various issues in pages, for feeding tracking categories that should remain empty). verdy_p (talk) 14:40, 8 February 2015 (UTC)
Why reverting ?
[edit]Requested once again: this has been reverted incorrectly, and redirected categories are no longer counting pagenames in target categories with apostrophes !! verdy_p (talk) 12:39, 23 March 2015 (UTC)
- @Verdy p: Hello, Replying here to your msg on my talkpage (so that other users can reproduce the bug) Can you please post the fixed template at Template:Category redirect/sandbox? Then i can copy and past the fix. Thanks. --Steinsplitter (talk) 16:06, 14 February 2016 (UTC)
- This is already posted since long (above in the linked sandbox). verdy_p (talk) 16:09, 14 February 2016 (UTC)
- Note: you added recently an attempt to detect when the parameter contains the full pagename of the target category. However this template never had this. Parameter 1 can only be a category name without the namespace prefix.
- I've not tested your attempt to allow also full page names. My opinion is that your modification to support it is in fact undesirable. The template shouls not be used on any other page except categories. Any attempt to use a namespace should create an error. verdy_p (talk) 16:13, 14 February 2016 (UTC)
- (Edit conflict) The edit is removing the {{#ifeq:{{NAMESPACE part which would break the template where it is used with Category:Catname instead of Catname --Steinsplitter (talk) 16:15, 14 February 2016 (UTC)
Categories with quotes
[edit]Does the template have a bug with quotes? Category:Ca' Pesaro and some similar ones don't get added to Category:Non-empty category redirects. Federico Leva (BEIC) (talk) 15:43, 13 April 2016 (UTC) {{Editprotected}}
- It's a magic word bug; its workaround appears to be replacing
-->{{#ifexpr:{{PAGESINCAT:{{PAGENAME}}|R}}>0<!--
- with
-->{{#ifexpr:{{PAGESINCAT:{{#titleparts:{{PAGENAME}}}}|R}}>0<!--
- . FDMS 4 17:12, 13 April 2016 (UTC)
Done --Jarekt (talk) 17:33, 13 April 2016 (UTC)
- @Jarekt and FDMS4: Looks like something went wrong, template doesn't show and categorizes a category as Category:Template redirects. --Nenntmichruhigip (talk) 11:02, 30 April 2016 (UTC)
- Can you give an example? Category:Ca' Pesaro is in Category:Category redirects, and I don't see any category redirects in Category:Template redirects … FDMS 4 11:34, 30 April 2016 (UTC)
- I do not see any issues at the is point. Nenntmichruhigip if there is still a problem, please explain in more detail. --Jarekt (talk) 13:38, 2 May 2016 (UTC)
- Looking at it more exactly, I noticed I used Template:Category Redirect (with uppercase 'R') instead of thisone, and the issue has nothing to do with your change. The other tamplate's content is only an inclusion of Template:Template redirect, while it should also contain a redirect instruction. I fixed this redirect now. Category:Template redirects also contains one other template page which is not recognized as redirect by MW: Template:User Cs-admin. This might need to get fixed as well, but differently (by removing Template:Template redirect from it?) as it includes another template with parameters, instead of intending to be an actual redirect. --Nenntmichruhigip (talk) 16:34, 2 May 2016 (UTC)
- I do not see any issues at the is point. Nenntmichruhigip if there is still a problem, please explain in more detail. --Jarekt (talk) 13:38, 2 May 2016 (UTC)
- Can you give an example? Category:Ca' Pesaro is in Category:Category redirects, and I don't see any category redirects in Category:Template redirects … FDMS 4 11:34, 30 April 2016 (UTC)
- @Jarekt and FDMS4: Looks like something went wrong, template doesn't show and categorizes a category as Category:Template redirects. --Nenntmichruhigip (talk) 11:02, 30 April 2016 (UTC)
Edit request
[edit]Hello,
I would like to change, on the layout page, the line 6 from
|<span style="font-size:150%;">{{{header}}}</span>
to
|<span style="font-size:150%;">{{{header}}}</span><br>
I propose this modification to have the Note: message on the second line. Also, it can be a good idea to delete the Category:Commons templates-layout (if you find where it is set) because this category does not exist.
Cordially. --Niridya (talk) 19:34, 15 September 2018 (UTC)
Edit request, 9 June 2020
[edit]Request: On line 6, please replace {{#ifexpr:{{PAGESINCAT:{{#titleparts:{{PAGENAME}}}}|R}}>0
with {{#ifexpr:({{PAGESINCAT:{{#titleparts:{{PAGENAME}}}}|pages|R}} + {{PAGESINCAT:{{#titleparts:{{PAGENAME}}}}|files|R}}) > 0
.
Reasoning: The current code counts (non-hidden) categories, including the categories added by the template. To see why this is a problem, consider the following example (where the category "Foo" redirects to the category "Bar":
- The category redirect "Foo" is empty, and all is well in the world.
- Someone adds one page to the category. The category "Bar" is added to "Foo".
- The page is moved from "Foo" to "Bar" by the bot.
- The category "Foo" is still in the non-hidden category "Bar" due to the template, despite the category being otherwise empty.
- Foo is stuck in Category:Non-empty category redirects forever, even though it would be empty but for this bug.
Obviously, this is not ideal, and the above-proposed code fixes this. --Mdaniels5757 (talk) 16:57, 9 June 2020 (UTC)
Not done With your request erroneous categorization of subcategories could not be detected anymore. For the issue you speak of the category redirects have to be purged or null edited (should be tested whether purging is enough). This could be done with a bot. — Speravir – 23:19, 24 June 2020 (UTC)
- @Speravir: Thanks for your response. I actually already tested this, and a null edit to the category page (for both the redirect and the target, although there's no reason the target should matter) was not enough (you can see this for yourself at Category:1,2-dibromoethylene). Purging does not work either. A null edit to the template could work (but I feel like it won't), but I can't do that, as I am not a template editor on Commons (if you'd be willing to make a null edit to the template, I'd appreciate it).
Assuming a null edit to the template doesn't work, what do you propose? We could perhaps add a check for if there are exactly three parent categories (which would be the category redirect's target, Category:Category redirects, and Category:Non-empty category redirects, would that resolve your concern? Best, --Mdaniels5757 (talk) 00:24, 25 June 2020 (UTC)
- @Mdaniels5757: I have no solution either. Probably you could ask in Commons:Village pump/Technical or in Phabricator. My wrong assumption came from some days ago: I requested a speedy deletion of one these non-empty cat redirects (it was the first one because the name started erroneously with a closing parenthese and therefore it had been converted to a cat redirect), and for this I had to execute an ordinary edit. After he edit the cat disappeared from the list (it had not yet benn deleted). I can’t help, but for me this issue looks similar to phab:T247187. cf. also in Commons:Village_pump/Archive/2020/04: #Mysterious category (refreshed twice by thread starter in separate threads]], #Subcats missing. — Speravir – 22:36, 26 June 2020 (UTC)
- Interesting – I just now noticed the pointer for mw:Manual:category table: If the information in this table is incorrect, run the maintenance scripts populateCategory.php and/or cleanupEmptyCategories.php, if necessary with the --force option. Sounds like bot runs with interface admin rights. — Speravir – 22:48, 26 June 2020 (UTC)
Completely broken
[edit]This template may have made sense in the past. It's absolutely broken now.
Pages with this template are treated as actual categories and incoming links just populate the redirect page with nonsense, theoretically until a bot happens to notice.
Pages with the correct #redirect [[Category:...]] formatting automatically fix incoming links to point to the correct category instantly.
The second one is better. Every usage of this template should be converted by bot back to the better format, then the template itself should be deleted and the space permanently locked.
Similarly, Russbot is actively making category redirects worse using this template. Based on the comments here, you've been doing this for over a decade despite this being worse than the default formatting. Why? — LlywelynII 13:07, 16 May 2023 (UTC)
- This also came up at Commons talk:WMF support for Commons/Upload Wizard Improvements#Utilise redirects —TheDJ (talk • contribs) 16:10, 15 November 2023 (UTC)
- I second this. It also breaks when categories have characters it doesn't like in them. The problem is that the "move page" function automatically inserts this template; I didn't realise that "#redirect" was an option until right now. Furius (talk) 23:58, 5 December 2023 (UTC)
- If the categories are actually empty, we could use the template to redirect the page. It would look like: https://commons.wikimedia.org/w/index.php?title=Category:In_Gassen&oldid=857259994
- If for some odd reasons there are files in there, the redirect would disappear until the bot moved them. Hotcat would work in either cases. Enhancing999 (talk) 11:07, 2 March 2024 (UTC)
- Also causes redirects to show up in search results without being properly ranked and classified as redirects. https://phabricator.wikimedia.org/T317586 —TheDJ (talk • contribs) 19:11, 2 March 2024 (UTC)
- anyone knows why it was designed this way? #Redirect? 17 years ago people were questioning the same thing. RZuo (talk) 21:22, 5 March 2024 (UTC)
- I do. It's because files that refer to a redirected category, for performance reasons are not listed in the target category. When bots are not updating the pages with the correct category names, this 'hides' files and causes unexpected behaviour for people. They also don't show on the redirected page themselves. Some of this is captured in phab:T5311. Additionally way back in the day, when a page redirected, you could not include and/or show wikicontent on that redirect, that showed things to the user if they were to navigate to that page. But this was fixed some 10 years ago. I think soft redirects makes sense for wiki's where there are no bots or no reliable bots, but right now for Commons as long as we have a reliable bot, I don't think it is required any longer. (edit: R'n'B s suggestion of only doing it when empty might a good idea.) —TheDJ (talk • contribs) 13:05, 6 March 2024 (UTC)
- with an example Category:김유신, i understand what you mean now. thx a lot for the explanation.
- i think, as long as a bot is moving files to the target, it's perfectly ok to use the mediawiki standard redirect. RZuo (talk) 13:37, 6 March 2024 (UTC)
- I do. It's because files that refer to a redirected category, for performance reasons are not listed in the target category. When bots are not updating the pages with the correct category names, this 'hides' files and causes unexpected behaviour for people. They also don't show on the redirected page themselves. Some of this is captured in phab:T5311. Additionally way back in the day, when a page redirected, you could not include and/or show wikicontent on that redirect, that showed things to the user if they were to navigate to that page. But this was fixed some 10 years ago. I think soft redirects makes sense for wiki's where there are no bots or no reliable bots, but right now for Commons as long as we have a reliable bot, I don't think it is required any longer. (edit: R'n'B s suggestion of only doing it when empty might a good idea.) —TheDJ (talk • contribs) 13:05, 6 March 2024 (UTC)
add #redirect through the template
[edit]@R'n'B: would the suggested fix work for the bot? The template would add #redirect if the category is empty. Enhancing999 (talk) 09:46, 5 March 2024 (UTC)
- Short answer: if it adds #REDIRECT only when the category is empty, I'm indifferent. Long answer: I don't understand the whole discussion above. There are some categories that have both the {{Category redirect}} template and the #REDIRECT directive. IMO, this makes the situation worse. Let's suppose Category:X01 is a redirect to Category:X02. A user uploads a file and tags it with Category:X01. The template makes Category:X01 a subcategory of Category:X02, so if a user needs to see what files are in Category:X02, they at least see that the subcategory exists and may think to look in it for additional files. Now, if Category:X01 is only a soft redirect using the template, they can do that by clicking on the link to that category. But if Category:X01 also contains a hard redirect using the #REDIRECT directive, and the user clicks on the link to the subcategory, the hard redirect kicks in and they end up on the same page where they started, that is, Category:X02. That's not helpful to anyone. OTOH, if Category:X01 is empty, it doesn't appear as a subcategory of Category:X02 and so having a hard redirect wouldn't break anything. --R'n'B (talk) 15:26, 5 March 2024 (UTC)
- Yes, they wont need the template and #redirect. I tried searching for them, but search only found a few, some of which I fixed. The sample above didn't turn up. Enhancing999 (talk) 17:21, 5 March 2024 (UTC)
- @Enhancing999: try this one petscan:27154293, there are 874 as of this moment, and it would be a pretty easy fix to run a bot through.
If one uses HotCat to categorise, one is pushed to the appropriate target. If categorisation is done manually to a template cat redirect, then the cat shows up as a populated maintenance category. If a bot is doing the wrong thing, the bot should be stopped. — billinghurst sDrewth 22:05, 5 March 2024 (UTC)
- Thanks for the petscan query .. should have thought of that. I will take care of them. Enhancing999 (talk) 22:11, 5 March 2024 (UTC)
- And as a note, the addition of hard redirects to the soft redirects on categories is a problem. The hard redirect hides the category from HotCat, so the alternate category is not visible for the lookup. — billinghurst sDrewth 22:36, 5 March 2024 (UTC)
- And as another note, after resolving this, we probably should identify those categories solely with hard redirects, and look to address those. — billinghurst sDrewth 22:46, 5 March 2024 (UTC)
- "The hard redirect hides the category from HotCat": I don't think this is true. Try "Whitney Museum of American Art (West". Enhancing999 (talk) 09:54, 6 March 2024 (UTC)
- Also, hot cat is a specialised tool. There are many things that have to deal with categories and redirects, that won't be able to depend on hacked-up fixes in a single tool. We should strive to find solutions that don't depend on workarounds like that. —TheDJ (talk • contribs) 13:10, 6 March 2024 (UTC)
- And as a note, the addition of hard redirects to the soft redirects on categories is a problem. The hard redirect hides the category from HotCat, so the alternate category is not visible for the lookup. — billinghurst sDrewth 22:36, 5 March 2024 (UTC)
- Thanks for the petscan query .. should have thought of that. I will take care of them. Enhancing999 (talk) 22:11, 5 March 2024 (UTC)
- @Enhancing999: try this one petscan:27154293, there are 874 as of this moment, and it would be a pretty easy fix to run a bot through.
- Yes, they wont need the template and #redirect. I tried searching for them, but search only found a few, some of which I fixed. The sample above didn't turn up. Enhancing999 (talk) 17:21, 5 March 2024 (UTC)
- Potential problem here might be that #REDIRECT only works if it is the very first thing on the page. Any content in front of it, even whitespace I believe, would break the redirect. —TheDJ (talk • contribs) 13:15, 6 March 2024 (UTC)
I figured out a way to add it to the template. Should work out.I was worried about the Hotcat point above, but apparently it won't be much of an issue. Also, existing #redirect shouldn't affect the functionality. Enhancing999 (talk) 13:22, 6 March 2024 (UTC)- It didn't function [2]. It just displayed the beginning of a numbered list. #REDIRECT may need to be in the actual page, not the template output. Enhancing999 (talk) 09:01, 7 March 2024 (UTC)
Does the addition work? I can't really tell from the results in search. I added it also to Template:Disambig. Maybe the templates need to be added directly to the boost list? Enhancing999 (talk) 13:25, 6 March 2024 (UTC)
- It seems so: https://phabricator.wikimedia.org/T317586#9603385 —TheDJ (talk • contribs) 13:29, 6 March 2024 (UTC)
- I would note that {{Negative boosted template}} has quite a hefty penalty. Reducing any score to 25% of that score. Certain templates might benefit from being directly added to the boost list to have a more balanced ranking. However be careful of manipulating the ranking too much, there are more Wikimedian usecases than we often think and what you might want to hide, someone else might explicitly trying to look for. —TheDJ (talk • contribs) 13:32, 6 March 2024 (UTC)
- Disambig might actually be one of those usecases. You don't want it to be first (so under 100), but putting it last (25 and below) might be frustrating peoples ability to find the disambiguating page that will be able to lead them to the result they really need.. 80 or 90 ranking might be more appropriate for Disambig —TheDJ (talk • contribs) 13:34, 6 March 2024 (UTC)
- Oh and lastly, it is possible that it takes time for a change to reflect in the search index. I'd give any change at least a day or so before making any judgement. —TheDJ (talk • contribs) 13:37, 6 March 2024 (UTC)
- @Enhancing999 and TheDJ: {{Negative boosted template}} is for pushing things down to the search results to reduce the chance of users running into it. {{Low quality}} is probably the best example. The old approach for pushing things out of the search results is Commons:Deletion requests. Multichill (talk) 18:37, 2 June 2024 (UTC)
stuck=1 option for bot
[edit]At Template:Category redirect/sandbox (diff), I added a test for an option "stuck=" to have the redirects subcategorized into Category:Non-empty category redirects (with content likely added by template). Sample uses: [3] [4]
This could be added (or removed) by the bot when it logs "20 found, 0 moved". See User_talk:R'n'B#Subcategory for redirects with stuck content?. @R'n'B: . I wouldn't add it to the live template if the bot doesn't handle it, so we may want to discuss it at User_talk:R'n'B#Subcategory for redirects with stuck content?. Enhancing999 (talk) 09:49, 13 June 2024 (UTC)
Non-empty broken redirects
[edit]Currently:
have many identical categories (like Category:Georgia photographs taken on 2004-04-02). I think it's sufficient that broken categories are only in the later category. Enhancing999 (talk) 12:01, 24 June 2024 (UTC)