Sortkey for categories is ignored when category is inside a <ref> and DEFAULTSORT comes after <references/>

Assigned To
matmarex, Schnark, wikibugs-l

See URL for an example. The source is like this:


<references />


Expected result:
In both categories the article should be put under S.

Actual result:
Only in Category:Test2 the article is under S, in Category:Test it is sorted as its title says.

When you put the DEFAULTSORT before the <references/> it works as expected.

I don't know how this is handled internally, so this could be just a duplicate of bug 2700.

Version: unspecified
Severity: minor

bzimport added a project: Cite.Via ConduitNov 22 2014, 12:45 AM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz38435.
Schnark created this task.Via LegacyJul 17 2012, 7:34 AM
Umherirrender added a comment.Via ConduitSep 24 2012, 8:27 PM

The problem exist also for tags of core:



category links are added when the wikilinks are handled, for tags this is done within the tag processing because tags always return html. At this point the defaultsort is maybe not set and the category gets an empty sortkey, which than result in the page name as default.

A solution is to look for the old defaultsort at the already added categories when setting the new defaultsort, but that will also change the custom sortkey, when he is equal to the old defaultsort.

Need some extra doing at the end of the parse.

Bawolff added a comment.Via ConduitFeb 7 2013, 4:03 PM
  • Bug 44676 has been marked as a duplicate of this bug. ***
bzimport added a comment.Via ConduitFeb 15 2013, 2:40 PM

mail wrote:

Even if this may seem like something that will only rarely occur in a Wiki environment, it does indeed happen quite often as soon as templates (for database weblinks, literature etc.) are used in references that add maintenance categories for missing data etc.

Umherirrender removed a subscriber: Umherirrender.Via WebFeb 24 2015, 7:35 PM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.