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

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

jftugajftuga Posts: 2Questions: 0Answers: 0
edited May 2013 in General
Greetings,

I have signed up for the 15 day editor evaluation today. I wanted to try the Generator so I created a 3 column table from http://editor.datatables.net/generator/ and then downloaded and unpacked the DataTablesEditor.zip file.

My table name is "criteria". I then edited the php/lib/config.php for my MySQL settings (I am hosting on 1&1).

When I go to the criteria.html page, I get this error message as soon as the page finishes loading:

[quote]DataTables warning (table id = 'criteria'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.[/quote]

I inserted a row into the table by hand and still get the same error message. How can I troubleshoot this problem?


Thanks,
-John

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    What is returned from the server if it is not valid JSON? That will tell you what the issue is.

    Allan
  • jftugajftuga Posts: 2Questions: 0Answers: 0
    edited May 2013
    Hi Allan,

    What is the best way to go about determining what the server returns?

    How can I tell if the mysql connectivity is working or not? Is there a easy way to test this?

    Thanks,
    -John
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Best way is to use Firebug or the WebKit developer tools. They will now allow you to inspect the Ajax requests made by the browser and see what the server is returning. That will likely point to an SQL issue, connectivity issue etc.

    Allan
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Return from the server is:

    [quote]

    dbo461975059


    Warning: require(/homepages/16/d397438455/htdocs/facelift/jq/test/php/lib/Editor/Editor.php): failed to open stream: No such file or directory in /homepages/16/d397438455/htdocs/facelift/jq/test/php/lib/bootstrap.php on line 40



    Fatal error: require(): Failed opening required '/homepages/16/d397438455/htdocs/facelift/jq/test/php/lib/Editor/Editor.php' (include_path='.:/usr/lib/php6') in /homepages/16/d397438455/htdocs/facelift/jq/test/php/lib/bootstrap.php on line 40

    [/quote]

    Looks like a path issue.

    Allan
This discussion has been closed.