WordPress.org

Support

Support » Plugins and Hacks » TablePress » [Resolved] Sorting Ascending: Links

[Resolved] Sorting Ascending: Links

  • When a visitor clicks the table header, tablepress correctly sorts ascending.

    WP Admin > Tablepress > Edit Table > Column A > Sort Ascending Image does not give the same results.

    *sometimes domain is different than name
    *sometimes link starts with http:// or www. or etc..

    How do I get the same results as the visitor using the Sort Ascending Image?

    Thanks for the quality work, love the community contribution!

    *import / export table

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    @tobiasbg

    Hi,

    thanks for your post, and sorry for the trouble.

    Unfortunately, I have bad news: The sorting algorithms on the frontend (where the visitor sorts) and on the “Edit” screen (where the admin sorts) are fundamentally different at this time. Due to that, the sorting on the “Edit” screen is inferior to the sorting on the frontend. This is for example visible in your table: While the frontend sorting recognizes that the cell content is a link (i.e. it’s HTML code), the “Edit” screen sorting will not recognize that and sort the entire string. I have plans to make these sortings equal, but unfortunately, this is not that easy. Sorry.

    Regards,
    Tobias

    What may I do to help solve this problem?

    Thanks for the swift reply.

    ETA on integration?

    Plugin Author TobiasBg

    @tobiasbg

    Hi,

    hhm, that’s hard to say… Basically, what’s necessary is the integration of the DataTables JavaScript library on the “Edit” screen. However, due to the structure of the HTML code there (with many textareas and other stuff), this is not trivial. Also, the JS library’s sorting code would have to be adjusted to use the content of the textareas for sorting, and it would have to take into account changed cells. This is not that easy unfortunately, and that’s why I can’t give an estimate on when this will be available 🙁

    Now, to maybe at least find a workaround for you to bring the table into the desired order: How often would you be performing this sort on the “Edit” screen? Just once for one table for the initial order? Or more often/regularly on several tables?

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] Sorting Ascending: Links’ is closed to new replies.
Skip to toolbar