Uncaught TypeError: Cannot read property 'length' of undefined

Uncaught TypeError: Cannot read property 'length' of undefined

ddessddess Posts: 7Questions: 3Answers: 0

Hello,

I'm using jquery datatable with Json bind and server side processing enabled.

When I publish my app to IIS, I'm getting this error: "Uncaught TypeError: Cannot read property 'length' of undefined", there is no error on local development.

Please help, I need every idea of what is probably cause of that urgently, thanks a lot.

This question has an accepted answers - jump to answer

Answers

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

    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

  • colincolin Posts: 15,237Questions: 1Answers: 2,599
    Answer ✓

    But as a start, check the JSON data - it might be the different server hasn't got permission to access the data.

    Colin

  • ddessddess Posts: 7Questions: 3Answers: 0
    edited April 2020

    Hi Colin, thank you very much for your answers. You are right I should use test case, but I want to learn what probably cause of that situation.

    You said it might be the different server hasn't got permission to access the data, I saw that answer at different sites too. I'm new at coding, can you detail how to check this? Thank you so much.

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

    The easiest way would be to type the URL into your browser and see if it returns the expected data.

    Colin

  • ddessddess Posts: 7Questions: 3Answers: 0

    Yes, that solved the issue. Thank you so much.

This discussion has been closed.