DataTables Warning w/ Large Table

DataTables Warning w/ Large Table

chrisp12934chrisp12934 Posts: 3Questions: 1Answers: 0

I'm using DataTables to approximate an Excel type display of user data with frozen columns, static headers, etc. I'm using PHP to generate the full HTML table and sending that to DataTables on Dom Ready. On large tables (1000 rows x 200+ columns), I get the following error (on Chrome and Firefox):

DataTables warning: table id=sites - Requested unknown parameter [some number] for row [some row]. For more information about this error, please see http://datatables.net/tn/4

The parameter and row values change each time I load the same data set, so it doesn't appear that it's the actual data that is bad. If I reduce the number of records returned via my query from the database, it works every time. My latest successful test was for 719 rows with the full compliment of columns. I assume it has to do with processing that many Dom elements, but everything I've read seems to indicate DataTables should have no issues with tables this size.

Any suggestions as to the root of the problem or a solution/work around?

Answers

  • BardnetBardnet Posts: 3Questions: 2Answers: 0

    Maybe one row has an invalid value that cannot be cast to the type matching the column. Empty string cannot be cast to a date or something like that.

  • chrisp12934chrisp12934 Posts: 3Questions: 1Answers: 0

    If it was based on an invalid value, I would expect the parameter and row information to remain consistent, not change on each attempted load. In addition, the error doesn't come up on a smaller set, regardless of which records are being loaded. Again, if it was an actual data error, I would expect the problem to be consistent.

  • chrisp12934chrisp12934 Posts: 3Questions: 1Answers: 0

    SOLVED: The issue was server side. I was getting a PHP execution time exceeded error from the server which was truncating my data. It changed parameters because where the timeout happened varied based on the server's processing time.

    I found it by turning off DataTables altogether and loading the raw HTML into a new page.

This discussion has been closed.