Page MenuHomePhabricator

Categorymembers query won't start listing from the desired page using sortkey
Closed, ResolvedPublic

Description

Given i.e. the page "ácido" and its hex sortkey 272b372d4301868d08010a00 retrieved through prop=categories, then packed and url-encoded, the request

http://pl.wiktionary.org/w/api.php?action=query&list=categorymembers&format=xml&cmtitle=Kategoria%3Ahiszpa%C5%84ski%20%28indeks%29&cmprop=title|sortkey&cmlimit=10&cmsort=sortkey&cmdir=desc&cmstartsortkey=%27%2B7-C%01%86%8D%08%01%0A%00

doesn't start listing from "ácido" (it should be on the top).


Version: 1.24rc
Severity: normal

Details

Reference
bz70690

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:51 AM
bzimport set Reference to bz70690.
bzimport added a subscriber: Unknown Object (MLST).

I wish cmsortkey didn't take input in binary; I suspect what's happening here is that some layer is trying to interpret the binary characters as UTF-8 and thereby screwing them up.

I think the real fix here will be deprecating cmstartsortkey and cmendsortkey in favor of something like cmstarthexsortkey and cmendhexsortkey that take the input hex-encoded.

gerritadmin wrote:

Change 159746 had a related patch set uploaded by Anomie:
API: Deprecate binary sortkey input in ApiQueryCategoryMembers

https://gerrit.wikimedia.org/r/159746

gerritadmin wrote:

Change 159746 merged by jenkins-bot:
API: Deprecate binary sortkey input in ApiQueryCategoryMembers

https://gerrit.wikimedia.org/r/159746

This should be deployed to WMF wikis with 1.24wmf22, see https://www.mediawiki.org/wiki/MediaWiki_1.24/Roadmap for the schedule.