Okay
  Public Ticket #2261827
Invalid JSON Response
Closed

Comments

  • Marc started the conversation

    Hi!

    I have a problem with the columns which will be parsed/displayed as "URL link" when I'm generating the "URL" directly in a mySQL Query with CONCAT argument:

    SELECT KDNR, Vorname, Nachname, Ort, Gesperrt, CONCAT('https://www.anydomain.de/sub/', ID, '/') AS Anzeigen FROM tblKunden WHERE Funktion IN (0, 'mh-kunde')

    The following error occurs if you search the whole table or the specific concat-column ("Anzeigen"): 

    DataTables warning: table id=table_1 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1

    The AJAX response is null / fully empty in that case.

    In my case that column is not required to be filtered, so I deactivated the filtering and search option from data-options for this column, but the error occours yet.

    For me its possible to store that URL temporarily in the database to prevent this situation, but maybe you have a tip for a deescalation of that issue in the future.

    My idea for example is to "simulate" the MasterDetail Option on that link, because of the fact the technique of MasterDetail uses POST-Data, which is not a good thing in my case, and some other links to completely different pages and scenarios, but in need of the context of an information of the query in it (ID, slug, etc). So I come up to get this done with the CONCAT ...

    Thanks in advance!

    Kind Regards, Marc.

  •  2,572
    Aleksandar replied

    Hello Marc.

    Thank you for your purchase.

    This seems like a fairly simple query, and should be working fine. This error message usually occurs when there are some permission issues for some user roles, or non-logged in users. It's not implied by wpDataTables, but through security plugins, or server security settings.

    Are you able to generate the table without CONCAT? If so, then the issue probably doesn't lie with the permissions.

    Please provide me a temporary WP-admin login for your site where this happens, so we could log in and take a look ‘from the inside’ as that’s the most efficient way to see and resolve the issue. We do not interfere with any data or anything else except for the plugin (in case that’s a production version of the site), and of course we do not provide login data to third party. You can write credentials here just check Private Reply so nobody can see them except us.


    Kind Regards, 

    Aleksandar Vuković
    [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