Error when loading : "Uncaught TypeError: g is null"

Error when loading : "Uncaught TypeError: g is null"

olivierGolivierG Posts: 3Questions: 2Answers: 0
edited May 2021 in Responsive

I have a table which works fine without responsive.
When I load the responsive files and add "responsive: true" in the parameters, the table does not draw and I get "Uncaught TypeError: g is null" in the console.

-Test case :
-The dataTables debugger shows no error.
-The script and style loaded are :

Thank you for your help.

This question has an accepted answers - jump to answer


  • kthorngrenkthorngren Posts: 14,612Questions: 25Answers: 3,467
    edited May 2021 Answer ✓

    Interesting. I copied your table into this test case:

    The problem seems to be with the first footer row:

                    <tr id="titre-filtres">

    It seems responsive does not like footers that don't have columns for each table column. Remove that line and Datables properly initializes. Makes sense as responsive handles the footer as well. @alllan or @colin can confirm.


  • olivierGolivierG Posts: 3Questions: 2Answers: 0

    Many thanks !

  • colincolin Posts: 13,271Questions: 0Answers: 2,264

    Yep, exactly. It would also be worth running through a HTML validator as that's also picking up others - i.e. double </table> and a missing <tr> in the <thead>


Sign In or Register to comment.