DataTables warning: table id=table - Invalid JSON response

DataTables warning: table id=table - Invalid JSON response

fau2ntkUgWBtbBCLfau2ntkUgWBtbBCL Posts: 2Questions: 2Answers: 0

After migrating a working site from old hardware to new (and installing an updated web server and updated serverside application libraries) I'm receiving the below message when accessing some, but not all, of the pages that have DataTables on them.
Error messages shown: DataTables warning: table id=table - Invalid JSON response

Per the manual, when I inspect the content of the JSON message I see 404 NOT FOUND

I think what's happening is that the pages that have a trailing slash in the API call work and the pages that don't fail.

ajax: { type: 'GET', url: '/app/api/app?format=datatables&active=true'...  //works only on the old infrastructure
ajax: { type: 'GET', url: '/app/api/app/?format=datatables&active=true'... //works on the old and new infrastructure

Do you know what could be underlying this bit of pedantry?

Answers

  • kthorngrenkthorngren Posts: 21,321Questions: 26Answers: 4,948

    The 404 error is coming from the server and is not specific to Datatables. You will need to look at your web server configuration to find out why its requiring the trailing slash.

    Kevin

Sign In or Register to comment.