Getting error whenever trying to create state
Getting error whenever trying to create state
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown: TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>)
at n._deepCompare (datatables.min.js:114:17540)
at n._deepCompare (datatables.min.js:114:18474)
at n.compare (datatables.min.js:114:12370)
at r.findActive (datatables.min.js:114:24169)
at HTMLTableElement.<anonymous> (datatables.min.js:114:8830)
at HTMLTableElement.dispatch (jquery-3.5.1.min.js:2:43090)
at v.handle (jquery-3.5.1.min.js:2:41074)
at Object.trigger (jquery-3.5.1.min.js:2:71513)
at HTMLTableElement.<anonymous> (jquery-3.5.1.min.js:2:72108)
Description of problem: Hi everyone, I have a simple table generated in asp classic server-side. I added the state recover extension and now whenever I try to create a new state I get the described error. It's a simple table, only the status values.
This question has an accepted answers - jump to answer
Answers
This example can create states without the error. At a minimum please post your Datatables init code and versions being used. You can use the debugger to get the versions.
Better is to post a link to a test case showing the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Thank you for the reply @kthorngren ! The code and table creation are really simple.
https://pastebin.com/dp6D5saH
I followed the example. I will try to provide the test case.
Based on the error I thought you might be using the KeyTable extension. Your code confirms that. I built a test case with KeyTable and get the same error:
https://live.datatables.net/caqalofa/1/edit
@allan will need to take a look.
It looks like you are loading datatables.js and .css twice. First in lines 41 and 46 and again in lines 52 and 55. Problems can arise from duplicating the library loading but don't think its causing this particular error. Remove lines 41 and 46. Also since you are using BS 5 you might want to include the BS 5 styling libraries by selecting Bootstrap 5 in the first step of the Download Builder. Open the CDN link in line 55 and you will find a link to rebuild or modify the CDN link. Use that to open the Download Builder with the current selections then change the styling to BS 5.
Kevin