Property undefined ('nTr')
Property undefined ('nTr')
jdadwilson
Posts: 127Questions: 30Answers: 1
Datatables 2.0 is now implemented throughout one of my sites... txgrayson.org. Couple of issues but all now work.... allmost.
This morning I noticed that the 'Next' paging button throws an error...
TypeError: Cannot read properties of undefined (reading 'nTr')
at _fnDraw (datatables-2.2.js:3414:17)
at _fnPageChange (datatables-2.2.js:4818:4)
at datatables-2.2.js:12860:6
at HTMLButtonElement.<anonymous> (datatables-2.2.js:6294:5)
at HTMLButtonElement.dispatch (jquery-1.12.0.min.js:3:12344)
at r.handle (jquery-1.12.0.min.js:3:9071)
Here is a link... txgrayson.org/cemeteries
As always... TIA
jdadwilson
Answers
Searching the forum for the error I found this thread. You have
pageLength: [16],
. ThepageLength
docs state it requires an integer.Kevin
I changed the pageLength items to an integer. Problem still happens..
txgrayson.org/cemeteries
I'm getting an error when loading the page, and the "Next" button never shows:
Allan
Another interesting issue is that on the initial load or selecting the First button, the info at the bottom displays...
Note the leading zero on '016'.
But the other buttons displays
Note no leading zero. (select button '2').
Further note that the number of records displayed are 17-351. The pageLength value is not used to set the number of records to display.
'Next' button does not throw error, but it just doesn't work.
jdadwilson
I'm seeing this error in the console:
The table isn't loading now due to this error. Not sure why all the sudden the CORS error is occurring but it needs fixed so we can continue helping to debug.
Kevin
That will happen if the response for the server-side processing parameters
recordsTotal
andrecordsFiltered
are strings. As the documentation notes they must be integers.Allan