• Resolved ?ke Strandberg

    (@akestrandberg)


    URL columns have problems with sorting. If data is a simple url it is sorted alphabetically wich is correct. If data is formatted as url||DisplayText it is sorted by the whole string and not by DisplayText only. In most cases the column will be sorted on url. This makes sorting on this column type confusing for the end user.

    I have been diving into the code and found a solution that solves my problem but I admit that I have not tested it with html code in DisplayText.

    In the file plugins\wpdatatables\source\class.link.wpdatacolumn.php

    change
    protected $_jsDataType = 'string';
    to
    protected $_jsDataType = 'html';

    Please consider to make this change in the code either permanently or as a configurable option.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wpDataTables

    (@wpdatatables)

    Hi there,

    Thank you for sending this over. We will see how to implement and solve this the best way, maybe will go with your suggestion!

    Any word on this? I have been experiencing the same issue and have found no other workaround than the solution posted by @akestrandberg. Any help would be appreciated. Thanks!

    • This reply was modified 6 years, 9 months ago by Patrick.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sorting URL columns – Problem and Solution’ is closed to new replies.