Data table warning - Invalid Json response

Data table warning - Invalid Json response

istudent_learningistudent_learning Posts: 31Questions: 9Answers: 0

I have a dropdown with 4 different item types including one to call all item types. When i call for each item type, I do not get any error alert and gets my table but when i do all item types i get that invalid JSON alert warning. There are 1078 rows and receiving when i check in debugger tools. Is there a way to bind this objects(data) I am getting to any variable so that i could check them. If so then how?

Answers

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947

    Did you follow the troubleshooting steps in the link provided in the error?
    https://datatables.net/manual/tech-notes/1

    The error indicates there is a problem with the format of the json response. Without seeing the response its hard to say what the problem is.

    Kevin

  • istudent_learningistudent_learning Posts: 31Questions: 9Answers: 0

    I am going to do now.
    But what i did not understand is if there were any error in json object while I was trying to get all item types, wouldn't it be the case when I am trying to get each item type, at least one item type list of data which are not properly formatted to JSON should have caused the issue?

  • istudent_learningistudent_learning Posts: 31Questions: 9Answers: 0

    Once I get that alert message, In network tab in debugger tool, that request to get data disappear.

  • istudent_learningistudent_learning Posts: 31Questions: 9Answers: 0

    Is there other way to write data tables ajax call, like on success and on error way. How do i set break point once data is received and before tables gets populated?

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @istudent_learning ,

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.