Incorrect column count.

Incorrect column count.

vinxenxovinxenxo Posts: 2Questions: 1Answers: 0
edited December 2023 in Free community support

Link to test case: https://codepen.io/Vicente-Blas-Lopez-Plaza/pen/jOJPVyq

Debugger code (debug.datatables.net):

Error messages shown:
jQuery.Deferred exception: o is undefined St@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:20415
x@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:17777
https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:17881
https://code.jquery.com/jquery-3.6.4.min.js:2:1567
map@https://code.jquery.com/jquery-3.6.4.min.js:2:3536
map@https://code.jquery.com/jquery-3.6.4.min.js:2:1535
ut@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:17846
t@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:8513
https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:8696
each@https://code.jquery.com/jquery-3.6.4.min.js:2:3003
each@https://code.jquery.com/jquery-3.6.4.min.js:2:1481
w@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:3587
P.fn.DataTable@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:87065
http://localhost:5000/:40198:31
e@https://code.jquery.com/jquery-3.6.4.min.js:2:30158
https://code.jquery.com/jquery-3.6.4.min.js:2:30460
https://code.jquery.com/jquery-3.6.4.min.js:2:30669
c@https://code.jquery.com/jquery-3.6.4.min.js:2:28447
fireWith@https://code.jquery.com/jquery-3.6.4.min.js:2:29192
fire@https://code.jquery.com/jquery-3.6.4.min.js:2:29228
c@https://code.jquery.com/jquery-3.6.4.min.js:2:28447

DataTables warning: table id=resultadosTable - Incorrect column count. For more information about this error, please see https://datatables.net/tn/18

Description of problem:

I have reviewed all the documentation about this error and I cannot find the solution. The number of fields in the table header corresponds to the data fields, I am not using colspan either.

I am clear that the problem is in the <tr> rows of the "collapse" component but I can't find a way to tell datatables that that part is correct.

thanks for any help

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Your codepen shows:

    {"a":"foo","b":"bar"}
    Many messages, such logging, wow!
    Warning, warning!
    Oh noes, y u do dis?
    

    And nothing else.

    I don't see any code to debug either there or in your message. Can you update it to an example showing the issue please.

    Allan

  • vinxenxovinxenxo Posts: 2Questions: 1Answers: 0

    fixed..

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Thank you. Three of your rows only have a single column in then. Your header and the first row have 7 columns. The others have only 1. Hence they you are correctly getting the error message saying there is a column count mismatch. There is.

    To fix make sure all rows have 7 columns.

    Allan

Sign In or Register to comment.