Datatables show all entries maximum call stack size exceeded
Datatables show all entries maximum call stack size exceeded
I just added the editor and have been working with it a bit and I just noticed that when I change the number of records shown to include all, I get the following error:
jquery.min.js:3 Uncaught RangeError: Maximum call stack size exceeded
There are only 3 records in the table though. I found someone else mention that they had a similar problem and that it was caused by having multiple datatables included. I downloaded the "customized" version of the editor and I selected the option to include the datatables library, but I'm not sure if it actually did. Currently I include the following:
datatables.min.css, editor.dataTables.min.css, editor.bootstrap.min.css
datatables.min.js, dataTables.editor.min.js, editor.bootstrap.min.js
if I don't include datatables.min.js in addition to the dataTables.editor.min.js it throws the errors:
Uncaught Editor requires DataTables 1.10.7 or newer(anonymous function)
@ dataTables.editor.min.js:8(anonymous function)
@ dataTables.editor.min.js:7(anonymous function)
@ dataTables.editor.min.js:7
editor.bootstrap.min.js:5 Uncaught TypeError: Cannot read property 'Editor' of undefined(anonymous function)
@ editor.bootstrap.min.js:5(anonymous function)
@ editor.bootstrap.min.js:5(anonymous function)
@ editor.bootstrap.min.js:5
timesheet.js:299 Uncaught TypeError: $(...).DataTable is not a function
I'm using inline editing on 4 columns with a table that has about 20 columns, some of them hidden.
I have 3 rows in the datatables, the lengthMenu has 4 options, 10, 25, 50 and "All". This error only occurs when I select "All", I can select any of the other options and there are no issues.
"pageLength" : 10,
"lengthMenu" : [ [ 10, 25, 50, -1 ], [ 10, 25, 50, "All" ] ],
If I set "pageLength" to -1 by default, it also causes this error.
Answers
Hi,
Are you able to give me a link to the page so I can debug it please? I'm not sure why using Editor with a page length of -1 would give an error - there should be virtually no link between the two!
Allan
I private messaged you the link. Thank you!