Silent error in DataTables

Silent error in DataTables

netdevelopernetdeveloper Posts: 5Questions: 4Answers: 0
edited May 19 in Free community support

Link to test case:

        <link rel="stylesheet" href="" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
        <link href="" rel="stylesheet"/>
        <script src=""></script>
        <script src=""></script>
        <script src=""></script>

Debugger code (
Error messages shown:

    datatables.min.js:16 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
        at datatables.min.js:16:32902
        at Object.e [as success] (datatables.min.js:16:25769)
        at fire (jquery-3.5.1.js:3496:31)
        at Object.fireWith [as resolveWith] (jquery-3.5.1.js:3626:7)
        at done (jquery-3.5.1.js:9786:14)
        at XMLHttpRequest.<anonymous> (jquery-3.5.1.js:10047:9)
    (anonymous) @   datatables.min.js:16
    e   @   datatables.min.js:16
    fire    @   jquery-3.5.1.js:3496
    fireWith    @   jquery-3.5.1.js:3626
    done    @   jquery-3.5.1.js:9786
    (anonymous) @   jquery-3.5.1.js:10047
    load (async)        
    send    @   jquery-3.5.1.js:10066
    ajax    @   jquery-3.5.1.js:9682
    Tt  @   datatables.min.js:16
    Jt  @   datatables.min.js:16
    t   @   datatables.min.js:16
    (anonymous) @   datatables.min.js:16
    each    @   jquery-3.5.1.js:381
    each    @   jquery-3.5.1.js:203
    w   @   datatables.min.js:16
    P.fn.DataTable  @   datatables.min.js:16
    (anonymous) @   index5.html:253
    mightThrow  @   jquery-3.5.1.js:3762
    process @   jquery-3.5.1.js:3830
    setTimeout (async)      
    (anonymous) @   jquery-3.5.1.js:3868
    fire    @   jquery-3.5.1.js:3496
    fireWith    @   jquery-3.5.1.js:3626
    fire    @   jquery-3.5.1.js:3634
    fire    @   jquery-3.5.1.js:3496
    fireWith    @   jquery-3.5.1.js:3626
    ready   @   jquery-3.5.1.js:4106
    completed   @   jquery-3.5.1.js:4116

Description of problem:

Although my table gets rendered and everything seems to be operational (standard filter, column visibility, paging, paging length), I noticed that error in the developers console. For what I see its in the datatables script, not my code. I thought I would let you know and take care of it.


  • allanallan Posts: 59,799Questions: 1Answers: 9,682 Site admin

    Without a link to a test case showing the issue it is impossible to say for sure, which is why we ask for one in the template text and forum rules. I'm not even sure what your DataTables configuration is here.

    However, my guess is that it is something to do with the JSON format that you are loading. If you could at least show me that JSON and the DataTables configuration I should be able to offer some help.


  • netdevelopernetdeveloper Posts: 5Questions: 4Answers: 0

    Not my code, as you can see from the console messages, somewhere deep inside the minified DataTables javascript, it tries to access a length attribute and that is triggering the issue. I am not the author of the DataTables script.

  • tangerinetangerine Posts: 3,340Questions: 35Answers: 394

    I am not the author of the DataTables script.

    Allan is the author of the DataTables script. If you want his help, I suggest you respond appropriately to his post.

  • kthorngrenkthorngren Posts: 19,138Questions: 26Answers: 4,536

    What Allan is saying is that the error within the "minified DataTables javascript" is likely due to the returned JSON object or your Datatables configuration. Use the browser's network inspector tool to view the XHR response to copy the JSON data. Post an example here. Also post your Datatables initialization code.


Sign In or Register to comment.