Last modified: 2010-08-16 19:09:04 UTC
When two or more pages are given the same sort key, they seem currently to be sorted in category listings by the age of each page (oldest first). This is quite common in large biographical categories, where several people share the same name; see for example, the seven articles sorted as "Davis, Mark" in [[w:Category:Living people]]. It would make more sense for the list to be sorted by article title where the sort keys are identical (and thus appear in alphabetical order in most cases).
This was done in r69961, r69977, r70415 (although the implementation needs to be cleaned up a bit). User-provided sortkeys are now treated as prefixes to the sortkey you'd otherwise have, with a null in between so differences in the user-provided sortkeys always take precedence. This might regress if we switch to a collation algorithm that produces unreasonably long sortkeys. Also, it will still be arbitrary (by page_id, typically meaning creation date) when the two pages sort identically, like [[Foo]] and [[FOO]] now do.