Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
136
rated 0 times [  139] [ 3]  / answers: 1 / hits: 28187  / 11 Years ago, mon, june 3, 2013, 12:00:00

I'm getting two errors in my console upon viewing a webpage. Datatables is being used, and I am quite sure (as the errors state) that the issue is related to Datatables. The problem here is that I did not write this code, I am merely now trying to fix issues in the code. The odd thing is that this section of the code should have been working before, as I can visibly see it working on the live version. Am I correct in what I believe to be the error? If so, what is the best way to go about debugging this, when the code is not made by me, and the code and data is in large quantities?




DataTables warning: Unexpected number of TD elements. Expected 2040
and got 1981. DataTables does not support rowspan / colspan in the
table body, and there must be one cell for each row/column
combination. jquery.dataTables.js:5840



Uncaught TypeError: Cannot read property 'parentNode' of undefined. jquery.dataTables.js:2843



More From » php

 Answers
28

Do you have a URL that you can post so that we can take a look?



Cannot read propertyparentNodeof undefined is a javascript error that happens because you are trying to get the parentNode of something that doesn't exist.



The other error seems quite obvious? The number of TD elements in a TR is not in line with the rest of the table. Look at the HTML and check if the number of TD & TH elements in the THEAD, TFOOT and TBODY are all the same count. DataTables does not support rowspan / colspan in the table body



Please post a URL or HTML/JS snippet of the table, preferrably on http://www.jsfiddle.net


[#77843] Sunday, June 2, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jaylynbrynnk

Total Points: 706
Total Questions: 98
Total Answers: 91

Location: Israel
Member since Thu, Jan 7, 2021
3 Years ago
;