The sortkey handling should be working similarly what it worked before the T386783 which removed also the ability to update sortkeys by using self-categorization ie:
The new version did not allow for recategorizing the same file to the same cat with a new sort key after the pipe, the old version does that well.
Rough idea on how categorization should work (needs confirmation by checking it from the code)
When user adds, moves, copies or removes category without specifying sortkey (sortkey = undefined), it should:
- Use sortkey as wildcard which matches all categories with the specified name, regardless of whether there is a sortkey
- If category is copied then it will copy the sortkey too
- This is current behaviour, there is no change to this
When user defines both category name and sortkey and adds, copies or moves category :
- It should match to all categories with that category name and add or update the sortkey to new sortkey
- If the defined new sortkey is an empty string, then it should add or update to an empty sortkey
- Examples:
- Wikitext [[Category:Turku|]]
- JSON example: "mediawikiCategories": [ { "name": "Turku", "sort": "" } ]
- Examples:
When user defines both category name and sortkey and removes categories:
- It should remove the category only when both category and sortkey match (?)