This Forum has been archived

Visit the new Forums
Forums: Index Support Requests Sorting template
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 2120 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

Hello, I created this template to controlling the sorting of progressive files and pages in a category, especially to avoid that "Page 10" will be sorted before "Page 2". I used the DEFAULTSORT magic word, but I cannot understand why it's not working properly since if you try to see what sorting keys is used, there shouldn't be any problem. leviathan_89 17:45, 23 July, 2012 (UTC)

I see two problems with it.
The first part is that you apply the template to files, more specifically because the pagename of these files has an extension. The template takes the second piece of the pagename, and pads it to a maximum length of 4 digits. So a "2" becomes "0002", a "23" becomes a "0023" etc. With the files however, the second piece of the pagename looks like "2.jpg" and "23.jpg". That's longer than 4 digits already, so it doesn't pad it.
The second problem has to do with the caching of categories... It seems that the last page you edit is affecting the order of sorting. So the category gets messed up no matter what you do.
--IK Talk 19:01, August 4, 2012 (UTC)
I should have corrected the first problem, but I did not understand what the second one is about... leviathan_89 09:14, 5 August, 2012 (UTC)
The second one sorts the pages differently every time you save the page (at least in the tests I did). If you save a 23 page and then a 45 page, the pages might be sorted correctly (23 then 45). If you then save one of the pages again, their order might change (45 will be on top of 23). It's a pretty weird behaviour. --IK Talk 10:20, August 5, 2012 (UTC)
I didn't do any test yet, but that's definitely weird... is it a bug? Should I report it to the staff? Because the order should be unique unless the are some identical sort keys. leviathan_89 10:16, 6 August, 2012 (UTC)