Title: Sorting Problem &#8211; I do not get it.
Last modified: August 30, 2016

---

# Sorting Problem – I do not get it.

 *  Resolved [chill4](https://wordpress.org/support/users/chill4/)
 * (@chill4)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/sorting-problem-i-do-not-get-it/)
 * Dear Tobias,
 * after you supported us so bravely some time ago, I am a bit afraid to ask you
   for another favor. I did not find help on the other topics.
 * You already fixed my page: [http://www.danziger142.de/eigentumswohnungen-prenzlauer-berg/](http://www.danziger142.de/eigentumswohnungen-prenzlauer-berg/)
 * If you go there and sort after “Balkon/Terrasse” using Firefox, the results are
   weird. Under Chrome this works fine.
 * Do you have any idea why that happens?
 * Thanks a lot from
 * AnDee!
 * [https://wordpress.org/plugins/tablepress/](https://wordpress.org/plugins/tablepress/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/sorting-problem-i-do-not-get-it/#post-6190005)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * It takes multiple sorts for me in Chrome as well, as the sorting directly after
   the first click is also wrong. My assumption here is that this is caused by the
   HTML code for the links in the cells. Because of that, the content in the cells
   is a string and not a number.
    Now, as the reason for the links is in your other
   post at [https://wordpress.org/support/topic/link-entire-highlighted-row?replies=1](https://wordpress.org/support/topic/link-entire-highlighted-row?replies=1),
   I suggest that we take a look at that first, as we can then maybe remove the 
   link HTML again.
 * Regards,
    Tobias
 *  Thread Starter [chill4](https://wordpress.org/support/users/chill4/)
 * (@chill4)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/sorting-problem-i-do-not-get-it/#post-6190142)
 * Okay, Tobias!
 * Let us first see if we even get the whole wrows linkable. What is still irritating
   me is: Why does sorting work with the prices? And all the other columns? I inserted
   links in every column but this single column does not work…
 * My belief in your talent and capabilities is limitless, so let’s see…
 * Thanks from AnDee!
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/sorting-problem-i-do-not-get-it/#post-6190146)
 * Hi,
 * ok, now that the whole row linking is working, you can probably remove all those
   extra links again 🙂 The sorting should then work as expected again.
 * Now, for the reasons (at least as far as I think) why this happened: Sorting 
   is very complicated and always needs a sorting algorithm that is dependent on
   the data format, simply because numbers are sorting in another way as text or
   dates, etc. Also, numbers can have different decimal separators, like a `,` in
   German, but a `.` in English. All this has to be taken into account, and the 
   external DataTables JavaScript library from [https://www.datatables.net/](https://www.datatables.net/)
   that TablePress uses does that by offering sorting algorithms for a wide range
   of formats. Those algorithms get an extra challenge when the data that is actually
   the interesting data is captured inside of extra link HTML. Then, it sometimes
   has to remove that link HTML internally, first. In the case of prices, this is
   all fine, as it afterwards has to do more processing anyways (like internally
   removing the currency symbol). For a column with just numbers, it thinks that
   it doesn’t have to do anything else though – which is not accurate, however. 
   It would have to check the decimal separator but apparently is not doing that(
   maybe for performance reasons). So, this would require manual attention by adding
   another sorting algorithm.
 * But this is just my interpretation, as I’m not the developer of the DataTables
   JS library, I don’t know every detail of it 🙂
 * Anyway, removing the extra links again should now be the best fix to this.
 * Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Sorting Problem – I do not get it.’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [alphanumeric](https://wordpress.org/support/topic-tag/alphanumeric/)
 * [sorting](https://wordpress.org/support/topic-tag/sorting/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/sorting-problem-i-do-not-get-it/#post-6190146)
 * Status: resolved