Page MenuHomePhabricator

Broken sorting and multi-page categories for Cyrillic wikis
Closed, ResolvedPublic


Sorting in categories and multi-page category management does not work in Cyrillic wikis.

Steps to reproduce:

  1. Sorting in categories:Категорія:Померли_2015
    1. Expected: alphabetic order, Latin S, then Cyrillic А Б В ...
    2. Observed: random order К (cyr), О (cyr), S (lat), А (cyr), Б (cyr), В (cyr) etc.
  2. Multi-page category:Категорія:Померли_2015&pagefrom=Джекі+Коллінз#mw-pages
    1. Expected: next 200 articles starting from Джекі Коллінз
    2. Observed: 200 articles starting from Отто Каріус, with Джекі Коллінз as penultimate article on the list (thus getting wrong 200 articles)

Same for other wikis:

  1. Sorting in RussianКатегория:Умершие_в_2015_году
    1. Expected: alphabetic order, Latin D, G, H, I, S, then Cyrillic А Б В ...
    2. Observed: random order, М, Р, Э (all cyr), D, G, H, I, S (all lat), А, Б, В (all cyr) etc.
  2. Multi-page categories in Serbian:Категорија:Умрли_2014.&pagefrom=Џери+Конлон#mw-pages
    1. Expected: 200 articles from Џери Конлон
    2. Observed: 200 articles from Ana Marija Matute Auseho

This completely breaks multi-page management (impossible to get access to any other page beyond first), thus this should be unbreak now

Event Timeline

NickK triaged this task as Unbreak Now! priority.May 26 2016, 9:43 AM

Categories become unusable with this, thus unbreak now

My guess is that recently changed (or recently created) articles are not at the right place in these categories and are added at the beginning of the category instead of the corresponding sort key, but this might be a wrong guess.

Did your wiki by any chance recently asked for changing of category sorting (collation)?

Observation from testing:

Removed sortkey from Тарік Азіз
The order inКатегорія:Померли_2015 happened to be К (cyr), О (cyr), Т (cyr), S (lat), А (cyr), Б (cyr), В (cyr)
Returned proper sortkey
The order inКатегорія:Померли_2015 happened to be А (cyr), К (cyr), О (cyr), S (lat), Б (cyr), В (cyr), however, Тарік Азіз is first in the list of "А", while it should be after Вілфрід Агбонавбаре due to proper sorting.

Page purge nor blank edit doesn't enforce proper recategorization.

Did your wiki by any chance recently asked for changing of category sorting (collation)?

We asked for it several years ago, and it was done in 2013 ( T43040 ). There were no recent requests for Ukrainian, thus this is definitely not the reason.

I believe Ops is running maintenance/updateCollation.php on all the wikis today. It may be a temporary problem as the script takes anywhere from a couple hours to a couple days to run depending on the size of the wiki.

Yeah, see announcement here: and information on T86096. This should be fixed by Saturday.

The results in the links in the description seem to be different now, although still not correct. I would suggest giving it 24 hours and see if it is fixed tomorrow.

kaldari lowered the priority of this task from Unbreak Now! to High.May 26 2016, 9:51 PM

The script on ruwiki will, by my estimation, start to run tomorrow afternoon and finish sometimes in the evening or on saturday.

The reason is ruwiki is in the database shard, s6, where the two largest wikis affected by the transition reside - frwiki and ruwiki itself.

Unluckily, we can't run more than one wiki in parallel on the same shard since it would risk overloading the database.

Please be patient while we conclude the transition.

The script is running on ruwiki now, I've clearly been too pessimistic last night. I'll report when it is done. @NickK is the situation any better now?

Script has finished running, and as far as I can see, all pages reported in this ticket are now redered correctly.

@NickK, please reopen if you notice any remaining issues.

Thanks, I confirm that the problem is resolved.