Last modified: 2013-02-06 02:01:15 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 T34039, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 32039 - Incorrect category sorting order for pages whose sortkey prefix is a space
Incorrect category sorting order for pages whose sortkey prefix is a space
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Categories (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
https://pl.wikipedia.org/wiki/Kategor...
: testme
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-29 19:33 UTC by Beau
Modified: 2013-02-06 02:01 UTC (History)
3 users (show)

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


Attachments
Api output with sortkeys (4.52 KB, text/xml)
2011-10-29 19:33 UTC, Beau
Details

Description Beau 2011-10-29 19:33:33 UTC
Created attachment 9315 [details]
Api output with sortkeys

As you can see on the linked page (URL field) MediaWiki generates the following list:

C
Cheshire
Cambridgeshire
Cotswolds
Cumberland (Anglia)

H
Hampshire

A
Anglia Północna
Anglia Wschodnia (kraina)


This is not correct sorting order. There is another section dedicated for other articles begining with C letter.
Comment 1 Roan Kattouw 2011-10-30 20:31:02 UTC
<cm ns="0" title="Cheshire" sortkey="200a4348455348495245" sortkeyprefix=""/><cm ns="0" title="Hampshire" sortkey="200a48414d505348495245" sortkeyprefix=""/><cm ns="0" title="Anglia Północna" sortkey="414e474c49412050c393c5814e4f434e41" sortkeyprefix=""/>

Cheshire and Hampshire have a space as a sortkey prefix. It seems that neither the API nor the category pager are detecting this case correctly.
Comment 2 Bawolff (Brian Wolff) 2011-11-22 15:22:36 UTC
Interesting. Maybe $lang->firstChar( " foo" ) is somehow returning f instead of space for some reason, but i don't think it should.
Comment 3 Bawolff (Brian Wolff) 2013-02-06 02:01:15 UTC
hopefully this was a one time issue.

The problem here is that sortkeyprefix was the empty string (note the xml), but the sortkey generated was generated as if the prefix was a single space. The firstchar method gets the sortkeyprefix, it sees that it is empty and assumes no sortkey was used.

I don't see the issue presently, so hopefully it was a one time db inconsistency that got fixed. Closing worksforme. If you see this bug again, please re-open.

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


Navigation
Links