Error when loading : "Uncaught TypeError: g is null"
Error when loading : "Uncaught TypeError: g is null"
Hi,
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 : https://cpts-france.fr/cpts-trois-monts/datatables-responsive/
-The dataTables debugger shows no error.
-The script and style loaded are :
https://cdn.datatables.net/v/dt/dt-1.10.24/b-1.7.0/b-html5-1.7.0/b-print-1.7.0/r-2.2.7/datatables.min.css
https://cdn.datatables.net/v/dt/dt-1.10.24/b-1.7.0/b-html5-1.7.0/b-print-1.7.0/r-2.2.7/datatables.min.js
Thank you for your help.
Olivier
This question has an accepted answers - jump to answer
Answers
Interesting. I copied your
table
into this test case:http://live.datatables.net/vuwedeba/1/edit
The problem seems to be with the first footer row:
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.
Kevin
Many thanks !
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>
Colin