Uncaught TypeError: Cannot read property 'aoData' of null
Uncaught TypeError: Cannot read property 'aoData' of null
mzaz
Posts: 3Questions: 0Answers: 0
I am trying switch over to using server side instead of client side processing of data for datatables.
I have an index.php file with a div(#pagecontent) that I load my dynamic content(page) in. Currently I only have one page with a dataTable.
When I load the page with dataTable it works fine, but if I switch to a different page and then back I get this error:
[quote]
Uncaught TypeError: Cannot read property 'aoData' of null jquery.dataTables.min.js:93
J jquery.dataTables.min.js:93
fa jquery.dataTables.min.js:27
fnGetPosition jquery.dataTables.min.js:106
ResponsiveDatatablesHelper.createExpandIcon datatables.responsive.js:390
task_Table.dataTable.fnRowCallback timecube.js:534
A jquery.dataTables.min.js:95
x jquery.dataTables.min.js:39
Fa jquery.dataTables.min.js:49
(anonymous function) jquery.dataTables.min.js:46
oSettings.jqXHR.$.ajax.success timecube.js:551
j jquery-2.1.0.min.js:2
k.fireWith jquery-2.1.0.min.js:2
x jquery-2.1.0.min.js:4
(anonymous function) jquery-2.1.0.min.js:4
[/quote]
Also the dataTable is stuck with processing and no rows.
I have tried out various methods of destroying the dataTable between page loads, but it doesn't seem to be a connection with that. I have also checked the json response from the server against jsonlint and it validates fine
I got this code from your debug bookmarklet: iseled
http://debug.datatables.net/iseled
Hopefully someone with experience with server side processing can point me in the right direction
I have an index.php file with a div(#pagecontent) that I load my dynamic content(page) in. Currently I only have one page with a dataTable.
When I load the page with dataTable it works fine, but if I switch to a different page and then back I get this error:
[quote]
Uncaught TypeError: Cannot read property 'aoData' of null jquery.dataTables.min.js:93
J jquery.dataTables.min.js:93
fa jquery.dataTables.min.js:27
fnGetPosition jquery.dataTables.min.js:106
ResponsiveDatatablesHelper.createExpandIcon datatables.responsive.js:390
task_Table.dataTable.fnRowCallback timecube.js:534
A jquery.dataTables.min.js:95
x jquery.dataTables.min.js:39
Fa jquery.dataTables.min.js:49
(anonymous function) jquery.dataTables.min.js:46
oSettings.jqXHR.$.ajax.success timecube.js:551
j jquery-2.1.0.min.js:2
k.fireWith jquery-2.1.0.min.js:2
x jquery-2.1.0.min.js:4
(anonymous function) jquery-2.1.0.min.js:4
[/quote]
Also the dataTable is stuck with processing and no rows.
I have tried out various methods of destroying the dataTable between page loads, but it doesn't seem to be a connection with that. I have also checked the json response from the server against jsonlint and it validates fine
I got this code from your debug bookmarklet: iseled
http://debug.datatables.net/iseled
Hopefully someone with experience with server side processing can point me in the right direction
This discussion has been closed.
Replies
It looks like there is something going wrong in your fnRowCallback function. Try commenting it out and seeing if server-side processing works without it. If so, then that is there to look.
Allan
Commenting out fnRowCallback makes everything work.
I have been trying to add a responsive plugin to dataTables, and it seems there might be problem related to this.
[code]
"fnRowCallback" : function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
if (responsiveHelper) {
responsiveHelper.createExpandIcon(nRow);
}
},
[/code]
Allan
[code]
if (responsiveHelper){
responsiveHelper.disable(true);
}
responsiveHelper = undefined;
[/code]
Currently I run this first on every menu click, to make sure it is reset