ColReorder - Failed to execute 'insertBefore' on 'Node' : parameter 1 is not of type 'Node'

ColReorder - Failed to execute 'insertBefore' on 'Node' : parameter 1 is not of type 'Node'

MichaelECMichaelEC Posts: 23Questions: 9Answers: 0

Hi,

I've seen this question only posted a few times although nothing on any of those questions seem to match my exact issue and/or don't give too much to go on, apologies for posting this question again on here!

ColReorder has been working flawlessly on all my other tables (about 9 of them) although I can't seem to get it working on this one specific table - nothing jumps out as being different.

The exact error is

'Uncaught TypeError: Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'.'

Here's my DataTables code, very simple:

$(document).ready( function () {
    var oTable = $('#tbl_view_stocktake_details').DataTable(

{
            "paging": false,
            fixedHeader: true,
            colReorder: true,
});
});

Any ideas where I'm going wrong? If you need anything else, just ask, thanks!

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,343Questions: 26Answers: 4,954
    Answer ✓

    Seems like the error has occurred in those threads due to have roespan or colspan in the header or having blank tr in the footer. In those threads the developer asked for test cases replicating the issue. If the thead and tfoot look ok for you then please post a link to your page or a test case so it can be debugged.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Kevin

  • MichaelECMichaelEC Posts: 23Questions: 9Answers: 0

    Genius, thanks a lot Kthorngren - it was the blank <tr></tr> in the <thead> tag!

This discussion has been closed.