Jump to content

Template talk:DEFAULTSORT

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

"to help prevent widespread confusion" ?

[edit]

there is no "widespread confusion".

Successfully prevented, then. --Stemonitis 13:38, 28 February 2007 (UTC)[reply]

What's the point of this?

[edit]

All it seems to do is use the magic word and the parameter. Surely it's redundant to simply using the magic word? --kingboyk 21:13, 5 March 2007 (UTC)[reply]

Yes, but a lot of people type it wrongly, assuming that it's a template, and redirects are cheap, anyway. Using the magic word directly is preferable, but it's not worth editing an article just to alter {{DEFAULTSORT|Xxx}} to {{DEFAULTSORT:Xxx}}. Check "what links here" to see how common a mistake it is. --Stemonitis 17:14, 6 March 2007 (UTC)[reply]
Maybe its common, because people see that it works, so they incorrectly conclude that they did it right? Otherwise they would take a few minutes to see why it doesn't work and discover the proper syntax. Having multiple semantic constructions for a single task is bad - creates chaos and makes developing bots and user scripts harder. This is typical violation of the KISS principle. This template should be deleted. Occasional user errors can be periodically fixed by a bot. --DStoykov 16:52, 19 March 2007 (UTC)[reply]
A minor transgression of "KISS" is a lot less intrusive and disruptive than having "{{DEFAULTSORT|Xxxxx}}" appearing at the bottoms of articles. IF you want to program a bot to go through and correct all the instances of {{DEFAULTSORT|Xxxxx}} to {{DEFAULTSORT:Xxxxx}}, then you may do so (although the server load of that will probably outweigh any benefits — redirects are cheap), but to delete it would confuse people. Many users when they first see {{DEFAULTSORT:Xxxxx}} overlook the pipe symbol and conclude it's a template (I did, for one). When they find nothing at Template:DEFAULTSORT, they haven't got a clue what's going on. At least a message there saying that what they meant to type was {{DEFAULTSORT:Xxxxx}} clarifies that. If you don't like it, don't use it, but don't delete it: it does fulfil a useful purpose.
"Otherwise they would take a few minutes to see why it doesn't work and discover the proper syntax" — this cannot be guaranteed to be 100% effective. Even a single failure would justify this template's existence, and I'm sure there would be many more than that. --Stemonitis 17:02, 19 March 2007 (UTC)[reply]
Well, how about having having something like this for Template:DEFAULTSORT?
<includeonly>
[[Image:Important.svg|25px]] '''The correct syntax is <code>{{DEFAULTSORT:{{{1}}}}}</code>''' [[Template:DEFAULTSORT|More info]][[Image:Important.svg|25px]]
</includeonly>
<noinclude>
This template was created because some editors wrongly use <nowiki>{{DEFAULTSORT|sortkey}} instead of 
the proper syntax {{DEFAULTSORT:sortkey}}</nowiki>.

DEFAULTSORT is a [[Help:Magic words|magic word]], not a [[Help:Template|template]]. 
For more info, see [[Help:Categories#Default sort key]] and [[Help:Magic words#Miscellany]]
</noinclude>
One wouldn't need a 180+ IQ to figure out what's wrong and what to do, right? Now this would be preventing confusion, because it would let the user know that he did it the wrong way and how to do it right. Making him believe he did it right is creating confusion, not preventing it.
I'll look into creating a bot when I have time. It wouldn't put much load, because there is Special:Whatlinkshere/Template:DEFAULTSORT.--DStoykov 18:27, 31 March 2007 (UTC)[reply]

(←) I don't think such a thing should appear in articles as it would affect all ~600 pages where it is currently used and would just look unsightly and force people to fix something that isn't causing any problems. As far as fixing, it shouldn't be the only change made as there is no benefit to doing it and would be terribly minor. I have been fixing such occurrences using WP:AWB as I have had the fix integrated into the general fixes, and then running through the articles fixing spelling mistakes or performing other edits such as adding categories or stub templates or just fixing other things that are wrong at the same time. I do think however that it should be made more clear on the template page that this template shouldn't be used and that the magic word should be used instead. mattbr 09:21, 1 April 2007 (UTC)[reply]

I fully agree (with mattbr). It is much better to correct people's mistakes silently than to point them out with large exclamation marks. The AWB approach to fixing these tiny mistakes is undoubtedly the right one. Change them, by all means, if you're already editing the article, but don't shout at people for making an understandable mistake. --Stemonitis 09:32, 1 April 2007 (UTC)[reply]
Many Wikipedians (me, for example!) use cut-and-paste. If we happen to notice an article in which the Template is being used (and it appears to work), we'll replicate this mistake. Not good. "Silent" redirects will encourage Wikipedians to confuse magic words with templates. Also not good. There are currently no actual articles using the template version. Let's keep it that way. :-) Flatterworld 16:06, 12 April 2007 (UTC)[reply]
Not good, perhaps, but a damn sight better than editing articles merely to change the pipe symbol to a colon --Stemonitis 17:33, 12 April 2007 (UTC)[reply]
Could you please have a look at this discussion and offer your thoughts? I think it's important to instruct and enlighten the wikify project about this template and its use. Thanks! FoCuSandLeArN (talk) 15:56, 4 April 2013 (UTC)[reply]


In order to prevent you can make a gadget that is turned on by default, and when save page is clicked it replaces template by magic word. I can't imagine a one-liner (because of nowiki tag etc.) but some smarter people might come up with it.--Dixtosa (talk) 10:39, 16 May 2015 (UTC)[reply]

To convert or not to convert

[edit]

Should articles that currently have all categories individually sorted (such as article of names sorted with last name first) be edited to instead use this template or the magic word? Or does it really matter which method is used? — CobraWiki ( jabber | stuff ) 20:51, 22 March 2007 (UTC)[reply]

I haven't looked at the Mediawiki code, but I imagine there's no great difference performance wise. My approach would be to switch to the magic word if adding a new category, but don't bother updating if you're not making any other changes. --kingboyk 21:44, 22 March 2007 (UTC)[reply]
Technically it doesn't matter, but it's more convenient to work once DEFAULTSORT is there. You can use my user script at User:DStoykov/defaultsort.js to switch to DEFAULTSORT with a single click. However, as kingboyk said, don't do it unless you have made some other changes as well - this would clutter the history, Special:Recentchanges, etc..--DStoykov 18:27, 31 March 2007 (UTC)[reply]

Why does adding this to a page remove recent page changes?

[edit]

I edited a page which already contained DEFAULTSORT in, then shortly after made another edit. You can see the diffs here: [1]. The only edit I made for the newer version was to add an endspoiler tag...and yet the DEFAULTSORT seems to have been applied, removed, and also removed my previous changes. I also didn't change the "Dead body|corpse" wikilink...what's going on?? Burns flipper 15:57, 23 March 2007 (UTC)[reply]

A template cannot be responsible for such changes, as far as I can see, because they are not evaluated while editing, and contain no executable code. I believe I'm right in saying that you use Lupin's popups, which is a much more likely cause of the odd behaviour, although there may also be other causes that I've overlooked. --Stemonitis 16:52, 23 March 2007 (UTC)[reply]

Notice on template page

[edit]

To reduce the use of this template and to get people to use the magic word, how about putting something like this on the template page:

Any thoughts? mattbr 11:41, 1 April 2007 (UTC)[reply]

That's the message I was trying to convey, but I perhaps wasn't forceful enough. I would prefer {{notice}} to {{warning}} — it's not such an important issue that big red boxes and stop hands are really necessary, but having a notice there might have some effect. I was never very confident about my original wording, so I'd be happy to change it to something better. --Stemonitis 12:22, 1 April 2007 (UTC)[reply]

Yeah, {{warning}} is probably a bit forceful, but we still want to essentially say 'don't use this template'. How about using {{important}}?

I think it's a bit more attention grabbing than {{notice}}, but without some of the forcefulness of {{warning}}. mattbr 12:45, 1 April 2007 (UTC)[reply]

I'd be happy with that. --Stemonitis 12:46, 1 April 2007 (UTC)[reply]

(Comment moved) "To reduce the use of this template..." I don't understand. What is the harm is using this template over the magic word? Are the magic words processed faster or something? I have been using this template instead of the magic word because I thought there was no real difference. Please explain. — CobraWiki ( jabber | stuff ) 22:09, 1 April 2007 (UTC)[reply]

I can't provide a definite answer re speeds or server load or anything like that (I suspect that it uses slightly more space), but the use of the template creates a dependence on the template for something that isn't a template – it's a software feature. A template is potentially at risk of vandalism (although very small as it is protected, but the more it is used, the higher the risk), whereas there is zero risk with a magic word.
The more this template is used and appears in article code, the more people will use it not realising it is a magic word. I would say it is the most 'visible' magic word in article space, and as it has virtually the same appearance as a template (with the {{}}), people think it is a template and and use "|" instead of ":". This template was created to stop people finding a non-existent template and get confused as to why it didn't work. As people become more familiar with the fact that it is a magic word, and this can be helped by replacing instances of this template with the magic word (along with other changes in the article), people will use the magic word instead, meaning there is less dependence on this template, fewer people will use it, and the risk is reduced. Ideally this template wouldn't exist, but it will be confused for the magic word for a long time yet by new and established editors, so here it is. I hope that explains, sorry it was so long! mattbr 23:00, 1 April 2007 (UTC)[reply]
Thank you for your attempt to explain. In my opinion it was exceptionally thorough given your aforementioned uncertainties. I personally would have never known about the magic word if not for this template. I also just realized that I was in error before; I misread the note concerning the template and thought that I was using the template when I have been, in fact, using the magic word all along, so I can understand how others could get confused. I see this as something that is not used nearly enough as it eliminates mis-sorted articles through incorrect spelling or not sorting by the correct word. I suppose in the future a bot could replace this template with the magic word in all locations. — CobraWiki ( jabber | stuff ) 06:49, 2 April 2007 (UTC)[reply]
Yes, but as I think we've noted above, it would be wasteful to correct only that without making any other improvements to the page. It's much better to have a tool like AWB altering an article to bypass the template while other changes are being made. --Stemonitis 07:06, 2 April 2007 (UTC)[reply]

lowercase version

[edit]

Please make one; I tire of having to type "DEFAULTSORT" in all-caps all the time (and have others correct it since "defaultsort:" doesn't work). Thanks. -Eep² 12:22, 26 April 2007 (UTC)[reply]

A lower-case template already exists, but that would require a pipe symbol rather than a colon. Since {{DEFAULTSORT:}} was added to the edit box (below the "Do not copy text from other websites without permission. It will be deleted." notice when editing a page), I haven't typed it out once, because one can now insert it with a single mouse click (requires JavaScript, I believe). --Stemonitis 12:25, 26 April 2007 (UTC)[reply]
MediaWiki software limitation? Lame. -Eep² 07:51, 29 April 2007 (UTC)[reply]

Please add new interwiki

[edit]

Please add new interwiki for fr:Modèle:DEFAULTSORT

 [[fr:Modèle:DEFAULTSORT]]

(I've already updated the French and Russian interwikis.)

62.147.36.186 13:29, 10 May 2007 (UTC)[reply]

Done. Thanks for letting us know. --Stemonitis 13:44, 10 May 2007 (UTC)[reply]

Bot to add these on a massive scale?

[edit]

Can't we just get a bot to add all of these? Like look at the categories, if over half have the same LAST, FIRST pattern, then just add a DEFUALTSORT:LAST, FIRST and delete all the |LAST, FIRST s that are in the categories? DOes that make sense? --Rajah 10:36, 7 July 2007 (UTC)[reply]

There are many circumstances in which categories take unusual sorting orders. In most categories, Eleanor Roosevelt sorts as "Roosevelt, Eleanor", but not in Category:Roosevelt family. Categories containing only Icelandic people are sorted the Icelandic way, forename first, although the same articles are sorted 'surname', forename (see Icelandic name) in other categories (e.g. Halldór Laxness in Category:Nobel laureates in Literature). There are many other examples, and it would be difficult to tune the automation to take account of that. --Stemonitis 13:15, 7 July 2007 (UTC)[reply]
My proposal wouldn't alter those instances, only the ones that follow the pattern of the main DEFAULTSORT:Last, First pattern. This brings up another question I have: If you have DEFAULTSORT above categories, yet some categories still have a piped sort, e.g. "|First Last", would that "override" the DEFAULTSORT? If so, then I think my proposed solution would work. --Rajah 14:43, 7 July 2007 (UTC)[reply]
But in each of the instances I mentioned, it would be perfectly reasonable to have provided no explicit sort key to achieve the unusual sorting, but to rely on the default sorting by {{{PAGENAME}}}, e.g.:
[[Category:1902 births|Laxness, Halldor]]
[[Category:1998 deaths|Laxness, Halldor]]
[[Category:Nobel laureates in Literature|Laxness, Halldor]]
[[Category:Icelandic people]]
It is also surprisingly frequent to find different sort keys in the same article for no good reason, i.e. for someone to sort an article in one category as "Smith", in another as "Smith, John", and in others as "Smith, John, Jr." or "Smith (musician), John" or whatever. The robot would either ignore the alternatives as deliberate differences, or standardise them, possibly erroneously.
It may be possible to semi-automate the process of checking for ill-sorted articles, but every edit would need to be scrutinised by a human before being accepted. --Stemonitis 15:23, 7 July 2007 (UTC)[reply]
I'm sorry, because what I write is often confusing. I agree with there often different sort keys. That's why I said to replace only those sort keys that match the "DEFAULT" Sort key. The keys which differed, in whatever fashion, would be kept the same. --Rajah 17:35, 7 July 2007 (UTC)[reply]
Looks like the DEFAULT sort key can be overridden. See my edit to Halldór Laxness. --Rajah 17:37, 7 July 2007 (UTC)[reply]
You misunderstand me. Yes, it works for Halldór Laxness, because no category was defaulting to {{{PAGENAME}}}, but it could have been, and the {{DEFAULTSORT}} would have overriden the real default sorting of {{{PAGENAME}}}. I also made the point that not all variation in manually-added sort keys is appropriate. Some results from typos, some from categorisation before and after moves, some from misunderstandings, and so on. As a result, not all variation indicates a positive preference for a style of sorting; much of it is an error to be corrected, and the 'bot cannot know which variants are deliberate and meaningful and which aren't. It will not be able to avoid either leaving bad sort keys in or taking good sort keys out. Category indexing is a surprisingly complex endeavour, and is not one that is likely to be solvable by automated means alone. --Stemonitis 18:12, 7 July 2007 (UTC)[reply]

Is this working properly?

[edit]

How exactly is this supposed to work? I just added the template to Jake Peavy. When I went to look at Category:San Diego Padres players, Peavy was displayed as "Jake Peavy" and under the P section. Am i correctly assuming that these articles are still displayed by page name but sorted by the defaultsort? Long levi 21:49, 9 July 2007 (UTC)[reply]

Correct, neither piping nor this template change the name under which articles show up in the category, only their sort order. --GargoyleMT 03:44, 10 July 2007 (UTC)[reply]

Categorising pages that use DEFAULTSORT

[edit]

One advantage of using templates over magic words is that you can easily track use of the magic word via the template. You could, for instance, create a category called Category:Articles using the DEFAULTSORT magic word via the DEFAULTSORT template, or look at the transclusion list (in what links here) for this template. I am unaware of any equivalent way to do this for DEFAULTSORT. Is there a way to list all articles using DEFAULTSORT, and conversely to list all articles that lack DEFAULTSORT? Carcharoth 12:36, 5 August 2007 (UTC)[reply]

Put simply, no. Using the magic word directly (as is generally considered desirable) precludes the ability to track its use, just like other magic words, such as __NOTOC__ or parser functions. It might be something that the developers could introduce, but in the absence of a compelling reason to do so, I wouldn't recommend suggesting it (I'm sure they've got more important things to work on). The intention of the template wasn't to add extra functionality, but merely to allow for typos, and to provide a place for documentation. If a similar template were to be extended (e.g. with a category), I think it would be best to give it a different title such as Template:defsort to prevent confusion. --Stemonitis 13:00, 5 August 2007 (UTC)[reply]
OK, thanks for confirming that. I would have thought that this function would be desirable, at least for biographical articles. It would be an immensely useful clean-up category to be able to find all the biographical articles (at a first pass, those with {{WPBiography}} on their talk pages) that lack DEFAULTSORT. AWB could suggest a defaultsort based on the category pipes, and those without category pipes could similarly have AWB suggest a defaultsort based on the article title. You'd need humans to decide on the sortkey, because, as you've said elsewhere, sorting can be a very complex business. Bots and software should be used to identify candidates for clean up, and humans can then carry out the clean up. This would be one way to identify candidates for clean up. Possibly the only way to do it at present is to use a bot to read pages and output a list of those lacking DEFAULTSORT. Using the template to provide a category doesn't work because people should be using the magic word, not the template. What is needed is a category inside the magic word... Or a "what links here" thing for defaultsort. Carcharoth 13:22, 5 August 2007 (UTC)[reply]
I know you said not to hassle the developers, but I did post this at the technical Village Pump, to see what people think. I am also going to try some other possibilities. Carcharoth 13:32, 5 August 2007 (UTC)[reply]

Preventing confusion

[edit]

Following on from the section at the top of the talk page, I see that less than 200 pages link to this template. May I ask if there is a bot that replaces tranclusions of this template with the magic word (ie. changing a | to a :) and leaves a note on the talk page of the person who incorrectly used the template, telling them to use the magic word, not the template? If not, that would seem to be one way to prevent any future confusion. Though the small list of what links here seems to suggest that people do now in general correctly use the magic word instead of the template, it would be best to guard against some future upswing in misuse. Carcharoth 13:38, 5 August 2007 (UTC)[reply]

I realize this is probably the wrong place, but why have a "magic word" in a format that is so nearly identical to a template? Using this format is to condemn us to continue cleaning up this template and reminding editors to watch their format forever.
Why not use the hash-mark format like a redirect, so it is clearly different?
   #defaultsort "magic word"
Cheers. Michael Z. 2007-08-06 20:00 Z

Nominated for deletion; dox fix.

[edit]

{{Editprotected}} Please move the non-template material to Template:DEFAULTSORT/doc (see Template:Fact and Template:Fact/doc for example) so that documentation can be edited without affecting template. Then add {{tfd|{{subst:PAGENAME}}}} to the top of the template, per WP:TFD. — SMcCandlish [talk] [cont] ‹(-¿-)› 23:34, 5 August 2007 (UTC)[reply]

The template has been unprotected by Alison (talk · contribs). Cheers. --MZMcBride 00:13, 6 August 2007 (UTC)[reply]

Is this working properly

[edit]

On one page, it just came up with a blue box with the options "view" and "edit", and then after. I removed the latter, but it still seemed that clicking on view or edit did not work properly. -- Beardo 01:29, 14 August 2007 (UTC)[reply]

No it wasn't working properly, as the contents of the template were partially deleted when the TFD notice was removed, which I have now fixed. Also, please do not use this template but use {{DEFAULTSORT:}} so that the magic word is used directly. Thanks, mattbr 17:51, 14 August 2007 (UTC)[reply]

DEFAULTSORTing bots and Wikipedia namespace page

[edit]

There are several bots that do defaultsort where the existing category sort keys are in agreement. I know the operator of User:SmackBot has an approved task to do DEFAULTSORT for people stubs (see Wikipedia:Bots/Requests for approval/SmackBot XIII), but that only applies when "there is an unambiguous sort key given to existing categories". There is also Wikipedia:Bots/Requests for approval/BOTijo 5, but that too has the restriction "Only put DEFAULTSORT when all categories in article have the same SORT".

Essentially, these restrictions is because a human is needed to judge whether the name is of the form "GIVEN NAME, FAMILY NAME". You might think that the last name is the family name, but sometimes you have double surname that are not hyphenated, or you have some Asian names (and other countries as well) that are in the form "FAMILY NAME, GIVEN NAME", so they need to be sorted by the first word in the the title, not the last. It is possible that the category sort keys are wrong, but in that case the bots are only perpetuating errors, not introducing new ones.

I'm currently trying to gather more information on whether other bots exist and whether AWB has a DEFAULTSORT suggestion option. A lot of the information of DEFAULTSORT is scattered around different pages. Might it be an idea to have Wikipedia:DEFAULTSORT, as not everyone thinks to look here? The closest thing at the moment is Wikipedia:Categorization#Setting a default sort key. Could that be spun out into a subpage and bot details added? Carcharoth 18:12, 21 October 2007 (UTC)[reply]

Defaultsort on talk pages

[edit]

I've noticed this being added to a few talk pages. Personally, I don't see a point to this. It seems overly bureaucratic and picky, really no reason to do it. Other opinions? Wizardman 01:34, 30 May 2008 (UTC)[reply]

See also

[edit]

Template:Lifetime --Bejnar (talk) 18:59, 16 July 2008 (UTC)[reply]

Alphabetization of names with a single letter following a given name

[edit]

This question arises because of the use of Template:DEFAULTSORT. What is the English convention for alphabetization of names with a single letter following a given name? Some examples are Stevie B, Marga T, Eric B., and Schooly D. My contention is that, since these single letters are not legal surnames and, in some cases are not even derived from the surname initial (Stevie B and Schooly D), they should not be used for alphabetization. So, Stevie B would be sorted under Stevie, not B, Marga T under Marga, not T. If you have some input, please discuss it at WT:MOSBIO. — AjaxSmack 01:19, 12 August 2008 (UTC)[reply]

say what?

[edit]

Hi, I just got to this page to figure out what default sort is. This page is linked from User_talk:DefaultsortBot. I have no additional information as to what defaultsort is or what it does. Is it possible to link to a page that gives information as to what defaultsort is? PDBailey (talk) 12:55, 25 May 2009 (UTC)[reply]

It is a magic word to tell the software in what order to sort the page on category pages (for example in Category:Living people the articles are listed by surname). Help:Categories has more information on categories and sort keys. Please note the correct syntax is {{DEFAULTSORT:Sortkey}} rather than {{DEFAULTSORT|Sortkey}}. Hope that helps, mattbr 13:23, 25 May 2009 (UTC)[reply]
Ahh thankyou. This explanation helped a lot. Perhaps this wording and/or example should be used in the article?
Msmarmalade (talk) 20:05, 28 June 2014 (UTC)[reply]

Capitalization in the sort key

[edit]

A simple question: Why are the first letters of all (or most) words entered as the sort key of {{DEFAULTSORT}} frequently capitalized without any regard to proper English or even the name of the article? Here are a few examples, with the word(s) in question bolded:

Just wanted to know if there was any reason for this, if it really is necessary to retain improper capitalization (for the record, many articles do use the correct capitalization already), and if I might be missing something. --Sgt. R.K. Blue (talk) 21:24, 28 February 2011 (UTC)[reply]

It can vary based on category but in terms of alpha-sorting, wikipedia recognizes capital letters before lower-case ones, so "Z" comes before "a". So, one may want to set defaultsorts to get around this. As an example (not that these two subjects would ever appear in the same category, but if they did), Battle Royale would come before Battle of the Bulge without defaultsorting. Another option could always be to defaultsort "Battle royale". A lot of the sorting though is done by bots, which is why you see "film" in (1939 Film) capitalized, although I'd say that's entirely unnecessary but it doesn't really affect anything either way. --Starcheerspeaksnewslostwars (talk) 20:59, 8 March 2011 (UTC)[reply]
Thanks for your help. That's the kind of helpful information that ought to be readily available on this template's documentation page. --Sgt. R.K. Blue (talk) 07:28, 9 March 2011 (UTC)[reply]
I've been wondering the same, so thanks for asking! V2Blast (talk) 06:28, 23 April 2020 (UTC)[reply]
@V2Blast: Things must have changed since 2011, because that is not how it works now. In terms of alpha-sorting, Wikipedia does not recognize capital letters before lower-case ones. Per WP:SORTKEY In English Wikipedia, sort order merges (ignores) case and diacritics. For example, "Baé", "Båf", "BaG" would be sorted in that order. Also I've never seen a bot add a sortkey. --DB1729talk 15:03, 12 May 2024 (UTC)[reply]

Detecting articles about people which are misssing the DEFAULTSORT key

[edit]

Is it possible to detect all the articles about people that don't contain DEFAULTSORT ? I know many articles don't need the DEFAULTSORT key, but I want to know if it's possible to do that. —  Ark25  (talk) 13:08, 10 February 2014 (UTC)[reply]

[edit]

Please see this discussion about the Lifetime template. Thanks. Lugnuts Dick Laurent is dead 15:07, 4 March 2014 (UTC)[reply]

A DEFAULTSORT template just for people

[edit]

I think it would be a good idea to create a clone of this template but with a different name, for example PDEFAULTSORT (P stands for Person) and to use it only in articles about people. Then it would be very easy to count the number of articles about people. —  Ark25  (talk) 23:10, 13 April 2014 (UTC)[reply]

Other naming practices?

[edit]

How to apply the template for people who don't have a Western "First name + Family name"? I encounter this problem in relation with Ethiopian, Sudanese and South Indian names. Any takers? --Soman (talk) 07:06, 22 June 2014 (UTC)[reply]

With South Indian names, especially those that follow {{Indian name}} we use the given name for Defaultsort, or at least that's how I've seen it done. —SpacemanSpiff 05:45, 27 June 2014 (UTC)[reply]

DEFAULTSORT did not work

[edit]

DEFAULTSORT on my edit did not work. Is there any problem? --Tijd-jp (talk) 14:08, 29 October 2015 (UTC)[reply]

Tijd-jp, it seems to be working. The article Category:Film scores by O. P. Nayyar‎ that you had edited is a member of two categories:
If you had not done the DEFAULTSORT the O. P. Nayyar article would have been listed in the "F" section of those two categories. If you look at the categories you will see that both of them have Film scores by Vishal-Shekhar‎ under "F" as that article is missing a DEFAULTSORT much like the one you had added to the O. P. Nayyar article. --Marc Kupper|talk 21:41, 13 November 2015 (UTC)[reply]
Thank you, Marc Kupper. I do not know why, but it seems to work as expected after clicking on the [Save page] without changing. --Tijd-jp (talk) 12:03, 14 November 2015 (UTC)[reply]

Proper format for Arabic names which include the definite article "al-"

[edit]

My specific concern is about the article Bayram al-Tunisi which is its new name. It was moved from "Mahmud Bayram el-Tunsi". Everything updated except the DEFAULTSORT which still reflects the old name ({{DEFAULTSORT:Bayram el-Tunsi, Mahmud}}). I'm pretty sure I should change this, but I'm unsure about the proper formatting of the name. The simple formula "surname, forename" seems to be open to interpretation with Arabic names which include the definite article "al-". For example, here are several variations:

DEFAULTSORT Page Title
DEFAULTSORT:Atrash, Farid al Farid al-Atrash
DEFAULTSORT:Attas, Syed Farid Syed Farid al-Attas
DEFAULTSORT:Sahlawi, Mohammad Mohammad Al-Sahlawi
DEFAULTSORT:Asiri, Khalid (!!) Ibrahim al-Asiri
DEFAULTSORT:Jaafari, Ibrahim Ibrahim al-Jaafari
DEFAULTSORT:Kashgari, Mahmud Al- Mahmud al-Kashgari

Are there any opinions about the "correct" way this should be done? Thanks for your attention. Akhooha (talk) 17:50, 21 July 2016 (UTC)[reply]

This is 5 years late, but it looks like the consensus at Wikipedia:Categorization of people#Other exceptions is to remove the al from the first bit entirely, as for the Ibrahim al-Jaafari example above. Newystats (talk) 00:41, 13 July 2021 (UTC)[reply]

Extra rows

[edit]

Please remove extra leading and trailing rows in display. --5.43.78.148 (talk) 19:13, 10 December 2019 (UTC)[reply]

Is the tag working correctly?

[edit]

I have been using the DEFAULTSORT tag to fix some errors in stub categories for American politicians; either fixing incorrect ones or in some cases adding the tag to articles that don't have it. However, instead of putting them in alphabetical sequence, this is what is happening: ex. is for Category:Tennessee politician stubs

  • Granville Hinton
  • John Holsclaw Jr.
  • Williamson Hartley Horn
  • Dan Howell (politician)
  • Morton B. Howell
  • Hilary Ewing Howse
  • Renee Hoyos
  • Bruce Hurley
  • Chris Hurt
  • Leonidas "Leon" Howard

where I would expect Howard to be between Horn and Dan Howell; it instead puts it at the end of the H listing. I double checked to make sure I hadn't misspelled the tag, and it looks right. Is there a coding problem I'm missing (I wouldn't necessarily be able to fix it)... also this seems to have started recently. Any help appreciated. --FeanorStar7 (talk) 04:21, 18 November 2020 (UTC)[reply]

"Template:SORTIERUNG:Lasorling" listed at Redirects for discussion

[edit]

A discussion is taking place to address the redirect Template:SORTIERUNG:Lasorling. The discussion will occur at Wikipedia:Redirects for discussion/Log/2021 May 11#Template:SORTIERUNG:Lasorling until a consensus is reached, and readers of this page are welcome to contribute to the discussion. – Jonesey95 (talk) 16:06, 11 May 2021 (UTC)[reply]

alphabets similar to "é" are allowed?

[edit]

DEFAULTSORT:Chemet, Renée contains alphabet. should alphabets be in plain or can be accented like "é"? — ashtamatrikas (talkcontribactions) 07:22, 20 September 2021 (UTC)[reply]

More than a year late, but yes its allowed-- however "é" will be ignored in the sort order. (So it would read that sort key as "Chemet, Rene") :3 F4U (they/it) 13:26, 15 March 2023 (UTC)[reply]
@Freedom4U: I haven't noticed the behavior you describe. WP:SORTCAT states: English Wikipedia groups accented characters together with their unaccented version, so pages starting with À, Á, Ä, will be listed under heading A. Unless I'm misunderstanding something, this means "é" will be interpreted as the equivalent to "e". (So it would read that sort key as "Chemet, Renee") --DB1729talk 13:49, 15 March 2023 (UTC)[reply]
@DB1729: Ohhh that makes sense. I'm sorry—I misunderstood what WP:SORTKEY states. In English Wikipedia, sort order merges (ignores) case and diacritics. For example, "Baé", "Båf", "BaG" would be sorted in that order. I read 'ignores' and thought it meant ignores the entire letter. 🤦 That's my bad. :3 F4U (they/it) 13:53, 15 March 2023 (UTC)[reply]
@Freedom4U:Glad I could help. I think years ago I saw a page that had listed all the diacritics and alternate letters recognized by WP, but I can't find it now and was probably in a different context than sorting anyway. Also should probably ping User:Ashtamatrikas although it looks like they haven't edited much since the above post. Cheers:) --DB1729talk 14:19, 15 March 2023 (UTC)[reply]

Are we supposed to use this on redirect pages, too?

[edit]

Is this just for article pages, or are we supposed to use DEFAULTSORT on redirects for former/birth names, etc., as well? 1980fast (talk) 21:42, 23 October 2023 (UTC)[reply]

@1980fast:It would be unnecessarily redundant to categorize a redirect for former/birth names, as the target (the WP article title) should already be properly categorized. So "no" because there should be no category for it to be sorted in.
However, for redirects that are narrower scope links to sections within articles, those redirects may be categorized, and if so, they should be sorted either by DEFAULTSORT or directly by sortkey. --DB1729talk 22:02, 23 October 2023 (UTC)[reply]
Thanks for clearing that up! For context, my question stemmed entirely from the fact that, when I went to Template:R from birth name, I happened to notice the following text, right on the template, which confused me:
"In either case, be sure to include {{DEFAULTSORT:(surname), (given name)}} for correct category sorting of this person's name." 1980fast (talk) 22:16, 23 October 2023 (UTC)[reply]
@1980fast:Hmm, yeah that is confusing. I believe that guidance is incorrect. I've just randomly checked about 6 or 7 birth name redirects to famous people and none were categorized. Maybe someone else will stop by here to clarify? --DB1729talk 22:54, 23 October 2023 (UTC)[reply]
Glad I'm not the only one to be confused! I hope someone does clarify...but I noticed something:
If we look at Category:Redirects_from_birth_names (can't seem to make it a link, as it disappears when I add the brackets), they are all sorted by first name, which doesn't seem helpful. So maybe we are supposed to use it, but nobody has been? 1980fast (talk) 23:11, 23 October 2023 (UTC)[reply]
@1980fast: Yep, that's it. Link Category:Redirects from birth names by a adding a leading colon like this [[:Category:Redirects from birth names]]
. I think you're exactly right, we are supposed sort for the tracking/maintenance category only, but almost no one does. Cheers! DB1729talk 23:28, 23 October 2023 (UTC)[reply]
I think I'll start doing that going forward. Thanks again for the linking help. I would never have figured that out on my own! 1980fast (talk) 23:34, 23 October 2023 (UTC)[reply]

Species

[edit]

Is {{DEFAULTSORT}} supposed to be used on species pages? If so, is it supposed to be {{DEFAULTSORT:Genus species}} or {{DEFAULTSORT:Species, Genus}}? Thanks in advance. -- Classicwiki (talk) If you reply here, please ping me. 07:49, 12 May 2024 (UTC)[reply]

@Classicwiki: DEFAULTSORT can be used anywhere if it's helpful. Personally I prefer to sort individually per each category, except I do use it for persons' names and titles of works beginning with 'The', 'A', etc. Generally it's helpful if a page needs to be sorted differently from its title in multiple categories. "In multiple categories" being the key point, otherwise I recommend standard, individual sortkeys.
As for your second question, {{DEFAULTSORT:Genus species}} would never be useful anywhere because the genus is always first already. It would be completely redundant and even confusing to other editors. {{DEFAULTSORT:Species, Genus}} could be a legitimate use, but can you give me an example of where it might help? I can see sorting like that in the category for the genus, but that should be an individual sortkey. What other categories would need to sort species-first to justify DEFAULTSORT? DB1729talk 15:03, 12 May 2024 (UTC)[reply]
@Classicwiki:, species articles with scientific name titles should not have DEFAULTSORT. Some do, but it's pointless if the sort is {{DEFAULTSORT:Genus species}}, and that should removed. I have never seen a species article with {{DEFAULTSORT:Species, Genus}}, and I think that is a poor way to sort species in most categories.
Some species articles with common name titles have had DEFAULTSORTs such as "parrot, grey". Many articles that once had DEFAULTSORT of that form have since had it removed. That sort order may make sense in some categories, but not in others. In categories where that order didn't make sense it was necessary to override the DEFAULTSORT, although from what I've seen there wasn't much consistency in when DEFAULTSORT was overrriden (Grey parrot has had the DEFAULTSORT removed, but still has [[Category:Birds of Africa|grey parrot]]; Birds of Africa is actually a category where a sort order of "parrot, grey" might make sense).
When there is a genus category, a sort key is normally used to sort species by epithet within the genus category. E.g. [[Category:Genus|species. A sort key is not used when there is no genus category (i.e. when a species articles is in a category for a family or higher taxon).
In short, DEFAULTSORT shouldn't be used at all for species articles titled by scientific name, and Wikipedia has been moving away from using DEFAULTSORT for species articles titled by common names. Plantdrew (talk) 19:36, 13 May 2024 (UTC)[reply]
@Plantdrew, thank you for the answer, that makes sense. So I will move forward with removing {{DEFAULTSORT:Genus species}} when encountered on species articles titled by scientific name where no common name is widely used. I will then improve the category accordingly [[Category:Genus|species]]. --Classicwiki (talk) If you reply here, please ping me. 19:45, 13 May 2024 (UTC)[reply]