Unknown parameter on large table
Unknown parameter on large table
Checkium
Posts: 6Questions: 2Answers: 0
I have a large table (8496 rows) and I'm getting the error:
"DataTables warning: table id=DataTables_Table_0 - Requested unknown parameter '1' for row ***. For more information about this error, please see http://datatables.net/tn/4"
The error seems to happen randomly across the table every time I reload the page.
Thats where the db is on if you want to check it: https://vhack.olympiccode.ga/database/
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
This error can mean many things: data incompatibility based on column type, too few elements in data row compared to thead columns, etc.
@jr42.gordon The data is loaded on the HTML using PHP and MySQL, it loops trougth mysql rows and adds the data.
Very very odd. I don't immediately see the issue I'm afraid. DataTables is reading the data in the last row as
null
after column 2 for some reason.Could you try adding a new line (
\n
) after each closing <tr> please?Allan
@jr42.gordon The error seems to be totally random, nothing in the data specifies the error, theres nothing unique in the errors.Also, the error seems to happen around 300 in chrome, but only around 1000 or somethings 3000 in firefox, it only happens in some refreshes also, so it may be a rendering error
@allan That didn't fix, also nothing seem to be null in the db
@Checkium I don't have experience with PHP and MySQL. Why not use the ajax option in DT config and load the data that way?
@allan Is that possible?
@jr42.gordon How does ajax work? Any example? I never used it.
Certainly in older browsers there were some issues with performance with super long single line strings like here. I don't believe there are any more - but that really was a super long single line so it was worth ruling it out.
@Checkium - I've just loaded the page to have another look and it seems to be working absolutely fine for me now. Did you change anything?
Allan