DataTables warning: JSON data from server could not be parsed. - Page 3

DataTables warning: JSON data from server could not be parsed.

13»

Replies

  • ian_malcomian_malcom Posts: 2Questions: 1Answers: 0
    Had the same issues as mentioned above, happened at random on load, I think a previous poster was on the right lines of the data coming back before everything on the page was ready to handle it (I don't know I'm not jQuery expert).

    The fix for me was adding a php sleep command just before the json output within the datatable php file.

    e.g.
    [code]
    sleep(1);
    echo json_encode( $output );
    [/code]

    Although I'm sure there will be a safer way of doing this.
  • K9DoberManK9DoberMan Posts: 1Questions: 0Answers: 0
    edited May 2014

    Had this issue, and i think i solved it minutes ago, but still need to do further testing.

    I just changed the code to close the conection to mysql after the json output, like this:

    echo json_encode( $output );

    mysql_close($gaSql['link']);

    EDIT: I guess it was false alarm, but somehow i guess i get the error less times.

This discussion has been closed.