Getting dreaded "DataTables warning: table id=the_table - Requested unknown parameter '0'"
Getting dreaded "DataTables warning: table id=the_table - Requested unknown parameter '0'"
Hello, I'm getting the dreaded "DataTables warning: table id=the_table - Requested unknown parameter '0' for row 24. For more information about this error, please see http://datatables.net/tn/4". on adding a row. I have read this site for help and have confirmed columns match what is in form but still no good. Nothing shows up in javascript console. Here is a link to debugger trace:
http://debug.datatables.net/eluyej
Any ideas most welcome.
This question has an accepted answers - jump to answer
Answers
What code are you using to add the row? From your debug trace you should just be trying to add an 8 element array.
Allan
Do you mean the server side php or the Javascript? Here is a link to pastebin with my HTML code:
http://pastebin.com/ZrgCbSef
If you need php I will give you that too. As you can see I am using form with 8 elements (rel 0-7) so I don't know why I am having a problem. You will also notice that I don't use the delete option either because I was also running into problem where serverside was working fine but the client side was not updating until a page refresh. I dont know if two things are related but I thought I would mention it. Thanks for your time cause I have devoted much time to this trying to debug but essentially got nowhere.
The could would be whatever you are using to add the row. For example I see you have:
for removing rows....
Ah! - I I was about to type I don't see a call to
row.add()
orrows.add()
, but I see you are usingmakeEditable
. That is a very old script that hasn't been supported by its author for years and wasn't ever supported by myself. I don't think it has ever been compatible with DataTables 1.10.Editor is my own product for creating editable tables with DataTables.
Allan
Ok I was afraid of that. So basically I would have to switch to that plugin to get CRUD?
No - you could use the DataTables API if you want. Editor will hopefully save you a lot of time (that is what it is designed for) if you use it. But if you want to use your own forms, you can
row.add()
etc to update the table.Allan
thanks. I've already wrote a delete function. Now I will tackle the add and see how it goes. I must say you run one of the best support systems with the debugger, documentation, and your quick responses, all for an open source project. Job well done.