Invalid JSON response after restart PC without changing anything

Invalid JSON response after restart PC without changing anything

thepanonethepanone Posts: 4Questions: 2Answers: 0
edited June 2017 in Free community support

Hi, I'm using project (not mine) with DataTables that I have no clue about .

All I know, same page that run yesterday, today after restarting my PC display:
DataTables warning: table id=tableServerSide - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
and not displaying data for tables.

Even same clean project with exactly same fresh DB dispaly this error.

Could someone give me a hint?

In below link there is my response from browser network developer tool

https://gist.github.com/pleca/c59a109039c3675f3906956271d40fae

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    Hi,

    That's valid JSON, so there must be something else that is being returned as well which is causing it not to be valid.

    Can you use the debugger so we can glean some more information, or better yet, give a link to the page please.

    Allan

  • thepanonethepanone Posts: 4Questions: 2Answers: 0

    Here You are http://debug.datatables.net/ipohah

    Thank you

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin
    Answer ✓

    Yup - that JSON isn't valid. There are new line characters causing the issue. If you click your link above and then hit the "Tables" tab and then "Server interaction" you'll see the JSON data. Double click it and copy. The paste into jsonlint.com. It will confirm that it isn't valid.

    You need to modify the server-side script to have it return only valid JSON.

    Allan

  • thepanonethepanone Posts: 4Questions: 2Answers: 0

    Thank you

This discussion has been closed.