Template talk:DEFAULTSORT
From Wikipedia, the free encyclopedia
[edit] "to help prevent widespread confusion" ?
there is no "widespread confusion".
- Successfully prevented, then. --Stemonitis 13:38, 28 February 2007 (UTC)
[edit] What's the point of this?
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)
- 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)
-
- 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)
-
-
- 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)
- 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)
-
-
(←) 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)
- 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)
-
- 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)
-
-
- 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)
-
[edit] To convert or not to convert
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)
- 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)
- 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)
[edit] Why does adding this to a page remove recent page changes?
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)
- 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)
[edit] Notice on template page
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)
- 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)
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)
- I'd be happy with that. --Stemonitis 12:46, 1 April 2007 (UTC)
(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)
- 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)
- 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)
-
-
- 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)
-
[edit] lowercase version
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)
- 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)
-
- MediaWiki software limitation? Lame. -Eep² 07:51, 29 April 2007 (UTC)
[edit] Please add new interwiki
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)
- Done. Thanks for letting us know. --Stemonitis 13:44, 10 May 2007 (UTC)
[edit] Bot to add these on a massive scale?
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)
- 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)
- 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)
-
-
- 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)
- 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)
- Looks like the DEFAULT sort key can be overridden. See my edit to Halldór Laxness. --Rajah 17:37, 7 July 2007 (UTC)
-
-
-
- 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)
-
[edit] Is this working properly?
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)
- 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)
- Awesome! Thanks for the reply Long levi 04:49, 10 July 2007 (UTC)
[edit] Categorising pages that use DEFAULTSORT
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)
- 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)
-
- 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)
-
-
- 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)
-
[edit] Preventing confusion
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)
- 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"
[edit] Nominated for deletion; dox fix.
{{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)
- The template has been unprotected by Alison (talk · contribs). Cheers. --MZMcBride 00:13, 6 August 2007 (UTC)
[edit] Is this working properly
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)
- 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)
[edit] DEFAULTSORTing bots and Wikipedia namespace page
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)
[edit] Defaultsort on talk pages
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)

