Last modified: 2013-02-15 14:40:59 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T40435, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 38435 - Sortkey for categories is ignored when category is inside a <ref> and DEFAULTSORT comes after <references/>
Sortkey for categories is ignored when category is inside a <ref> and DEFAULT...
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Cite (Other open bugs)
unspecified
All All
: Low minor with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://de.wikipedia.beta.wmflabs.org/...
:
: 44676 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-17 07:34 UTC by Michael M.
Modified: 2013-02-15 14:40 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Michael M. 2012-07-17 07:34:17 UTC
See URL for an example. The source is like this:

Text<ref>[[Category:Test]]</ref>[[Category:Test2]]

<references />

{{DEFAULTSORT:Sortkey}}

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.
Comment 1 Umherirrender 2012-09-24 20:27:28 UTC
The problem exist also for tags of core:

<gallery>File:Wiki.png|desc[[Category:Test]]</gallery>

{{DEFAULTSORT:Sortkey}}

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.
Comment 2 Bawolff (Brian Wolff) 2013-02-07 16:03:44 UTC
*** Bug 44676 has been marked as a duplicate of this bug. ***
Comment 3 Andreas Praefcke 2013-02-15 14:40:59 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links