If you make a sortable wikitable and have one column of <span> elements using data-sort-value for sorting, is there some limit to the number of characters it can use? I am getting errors I've laid out here: https://criticalrole.miraheze.org/wiki/User:ByteBard/sortingerror
#Table sorting error
21 messages · Page 1 of 1 (latest)
I don't see any errors when I check that page (Chrome mobile) and all tables sort in the same way (1-5, then 5-1, then resets to default). Could you specify what errors are you seeing? 
Though according to https://m.mediawiki.org/wiki/Help:Sorting, sort value shouldn't be inside spans but a property of cells instead
I'm seeing these when clicking sort once
only the two top and bottom right tables seem to sort right 
Morning brain didn't wake up 😆
Tested and at least can confirm that spans work the same way as cell properties do
So that is not the issue
https://en.m.wikipedia.org/wiki/Help:Sortable_tables#Forcing_a_column_to_have_a_particular_data_type hmm maybe this is the issue
changing the data type to either text or number doesn't have any effect morning fog strikes again this was already tested
but removing the first half of the value fixes it
which suggests that there's indeed an issue with long numbers
Same with the original table with one less zero in the middle which works
@indigo flame what is the purpose of the long sorting values currently? Is there a reason for them to be this long?
I still can't find an exact explanation for this error, but making the sortvalues simplier would fix this as seen in examples
if you need to have a lot of leeway in adding sortkeys in between ones previously added and if shorter numbers aren't working for some reason, you could do it in a hacky way and use date/time. Which also works on 12 numbers
Thanks all, ended up getting it to work by setting data type to text! The sort value is a composite of the release date and episode number, with padded zeroes to avoid e.g. 1x20 coming after 1x110. I'm surprised that the sort value has a smaller character limit for integers than text!