Okay
  Public Ticket #1678647
URL Link not filtering
Closed

Comments

  • hulabula started the conversation

    Hi

    So I've been getting creative with my use of wpDataTables (love them!) but am having trouble with the URL Link column not filtering.  It could very well be what I'm attempting to do.

    Here's my table query:

    SELECT CONCAT('/Contract_DB/?p=', `wp_idw_contracts.post_id`, '||', `wp_idw_contracts.contracts_property`) as property_link,
           wp_idw_contracts.licensor_contracts,
           wp_idw_contracts.contract_imprint,
           wp_idw_contracts.contract_license_contract_number,
           wp_idw_contracts.contract_expires
    FROM wp_idw_contracts
    

    I then the column type on the property_link column to "URL Link" and tada!  I get a nicely formatted link to the relevant post without needing a filter and calls to the database or the user needing to understand pipebreaks and links.

    The problem is that this column doesn't want to filter.

    Thoughts as to why? Perhaps is just can't handle the concat, but I don't see why it shouldn't.

    Thanks


  • hulabula replied

    Just a bit more info from tinkering some more with this.  I CAN filter this table when Advance Column Filters AND Filters in a form are both on.  Sorting on the cancat column does not work at all.

    Non concat columns with URL Link can be sorted and filtered.

    Disabling server-side processing allows filters to work.  Which I could do except that I'm going to be dealing with a database of over 5000 rows :O

    Thanks!

  •  1,667
    Miloš replied

    Hi hulabula,
    Thank you for your purchase.

    If your MySQL-query based wpDataTable doesn’t work correctly with server-side processing, probably this is happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (happens rarely, but does sometimes). To avoid this please prepare a MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.


    Now as for the URL link column sorting, unfortunately this is not possible to achieve at the moment. We are working to find a proper solution for URL link sorting and I hope that it will be included in future updates of the plugin. For now the URL link column will sort from the first letters but the links are starting from http or https which is observed when you sort that column.


    Best regards.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables