Alphabetical sorting
-
Hello Tobias,
with the alphabetical sorting, I can not cope. Set all words that start with ä,ö,ü or letters such as ë and similar signs by click on the arrow button at the bottom of the table.
Please can you help me?
Many greetings
Christkind
-
Hi,
thanks for your post, and sorry for the trouble.
Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
Regards,
TobiasHi Tobias,
thanks for the fast answer.
Here the link to the page: http://www.klessath.de/mundart-von-a-z/.
Many greetings
ChristkindHi,
thanks for the link! I see what you mean now. The reason for this basically is how JavaScript sorts strings. It’s basically converting a letter into its numerical representation of the use character map and then compares those numbers. And in those character maps, special characters (like Umlauts, accents, etc.) only come after the regular letters.
So, unfortunately, there’s no easy way to change this, or at least I don’t know one 🙁 You’d probably have to develop a custom sorting algorithm based on the API of the DataTables JS library from https://www.datatables.net/ that TablePress uses.
Regards,
TobiasHi Tobias,
thanks for the answer.
Too bad that there is no way to sort by German rules. But I don’t change the Software. I like TablePress. Perhaps you have still another idea, how you can regulate the matter?
Many Greetings
ChristkindHi,
you could maybe change the sorting to use different data to what is actually displayed.
I suggest to take a look at adding an extra (hidden) column that contains the words again but without the ¨ or `, etc. only and that has sortable data. For hints on that, please see https://ww.wp.xz.cn/support/topic/sort-by-height?replies=4 which has a similar example.Regards,
TobiasHi Tobias,
thanks for the tip. Tried it and it works. Whether this solution in practice is a solution for me, I do not know. The table will in fact be very large. Let’s see.
Thanks again for your help.
Many greetings
Christ childHi,
great! Good to hear that you could make this work!
Best wishes,
TobiasHi Tobias,
This script works for sorting accented characters : http://lunarbovine.com/blog/2013/08/sorting-french-accented-characters-in-javascript/
Maybe this could help with the DataTables issue.Andre
Hi Andre,
thanks for sharing this link! That looks really nice, I didn’t know about that
localeComparefunction yet.
One can probably use that to create a custom sorting algorithm for DataTables.Best wishes,
TobiasHi Tobias, the sorting functionality on the “Edit” screen is not working for me. In other forum threads, you described a “sorting arrow icon” that appears next to the letter for the column header when you hoover over it with the mouse (e.g. the “A” if you want to sort the first column). However, I don’t see any icon when I hoover over the column headings– has this feature been removed or am I doing something wrong? Thanks for any assistance you can provide!
Sincerely,
Shenetta~Hi,
thanks for your post, and sorry for the trouble as well as for the late reply. I’ve been on holidays and therefore couldn’t reply earlier.
This indicates that something is then interfering on the “Edit” screen, likely another plugin. Can you therefore please try again after temporarily deactivating all other plugins and after switchting to a WordPress default theme like Twenty Sixteen? That way, we can find what’s causing this. If that does yet help, please re-install TablePress from a fresh download to be sure that all files are in place.
Regards,
TobiasHi TobiasBg,
Thanks for your response. We have a custom theme that was designed for us, so I don’t want to play around with switching the theme– I’m not that savvy with WordPress so I don’t want to mess anything up. I may try re-installing TablePress from a fresh download– but will I lose all of current my TablePress tables if I do so?
Thanks for any additional guidance you can provide.
Shenetta~Hi,
no, reinstalling will not affect your tables. Those are stored in the database and will not be touched.
However, reinstalling will not help here.We will have to find out what’s interfering on the “Edit” screen here, so that checking which plugin causes this is the best way to proceed.
If possible, I’d like to take a direct look at this on your site. Could you therefore please create a temporary admin account for me and send me the details via email (the address is in the main plugin file “tablepress.php”)? That way, I can investigate this directly. Thanks!
Regards,
Tobias
The topic ‘Alphabetical sorting’ is closed to new replies.