Page MenuHomePhabricator

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


Given i.e. the page "ácido" and its hex sortkey 272b372d4301868d08010a00 retrieved through prop=categories, then packed and url-encoded, the request|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



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:51 AM
bzimport added a project: MediaWiki-API.
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

gerritadmin wrote:

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

This should be deployed to WMF wikis with 1.24wmf22, see for the schedule.