Server Side Rendering
Server Side Rendering
Error messages shown:
jQuery.Deferred exception: Cannot read properties of undefined (reading '_fnCallbackReg') TypeError: Cannot read properties of undefined (reading '_fnCallbackReg')
at u._constructor (http://localhost:8080/tcis/webjars/datatables-responsive/2.2.7/js/dataTables.responsive.min.js:23:412)
at new u (http://localhost:8080/tcis/webjars/datatables-responsive/2.2.7/js/dataTables.responsive.min.js:23:126)
at HTMLDocument.<anonymous> (http://localhost:8080/tcis/webjars/datatables-responsive/2.2.7/js/dataTables.responsive.min.js:47:495)
at HTMLDocument.dispatch (http://localhost:8080/tcis/webjars/jquery/3.6.3/jquery.min.js:2:43336)
at y.handle (http://localhost:8080/tcis/webjars/jquery/3.6.3/jquery.min.js:2:41320)
at Object.trigger (http://localhost:8080/tcis/webjars/jquery/3.6.3/jquery.min.js:2:71942)
at HTMLTableElement.<anonymous> (http://localhost:8080/tcis/webjars/jquery/3.6.3/jquery.min.js:2:72537)
at Function.each (http://localhost:8080/tcis/webjars/jquery/3.6.3/jquery.min.js:2:3003)
at E.fn.init.each (http://localhost:8080/tcis/webjars/jquery/3.6.3/jquery.min.js:2:1481)
at E.fn.init.trigger (http://localhost:8080/tcis/webjars/jquery/3.6.3/jquery.min.js:2:72513)
Description of problem:
I am trying to upgrade from v1.10.19 to v2.1.0
Does the following statement still work for v2.1.0?
$.fn.dataTable.ext.legacy.ajax = true;
It seems to be true by default when I check it.
Here is my code, is there anything wrong?
$("#dataTables-example").dataTable({
bServerSide : true,
ajax : "/authSourceAjax",
bProcessing : false,
sPaginationType : "full_numbers",
bFilter: false,
responsive: true,
aaSorting: [[ 1, "asc" ]],
aoColumns: [
{sName: "seq" },
{sName: "id", bVisible: false},
{sName: "corporation" },
{sName: "name" },
{sName: "cname" },
{sName: "unitName" },
{sName: "status" },
{sName: "roles" }]
}
Answers
No - the legacy Ajax was removed as part of the v2 upgrade. You need to update your server-side script to expect the parameters documented here.
Assuming that is the issue of course. Without a test case it is hard to be certain.
Also worth making sure that you updated Responsive and any other extensions you are using.
Allan