New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: undefined is not an object (evaluating 'c.length') #77
Comments
Hi, This project is has not been active for a long time. Let's see if we can figure out what's wrong though. Can you provide the javascript block that's generated as well as the request/response for datatable? |
Yeah I've noticed haha, you were just my only resource after hours of trying to fix this. Any help is appreciated! As for the JS block, I'm unsure of which you're referring to - this is the block that is giving me problems function ub(a, b) {
var c = ta(a, b),
d = b.sEcho !== k ? b.sEcho : b.draw,
e = b.iTotalRecords !== k ? b.iTotalRecords : b.recordsTotal,
f = b.iTotalDisplayRecords !== k ? b.iTotalDisplayRecords : b.recordsFiltered;
if (d) {
if (1 * d < a.iDraw)
return;
a.iDraw = 1 * d
}
na(a);
a._iRecordsTotal = parseInt(e, 10);
a._iRecordsDisplay = parseInt(f, 10);
d = 0;
for (e = c.length; d < e; d++)
M(a, c[d]);
a.aiDisplay = a.aiDisplayMaster.slice();
a.bAjaxDataGet = !1;
N(a);
a._bInitComplete ||
ua(a, b);
a.bAjaxDataGet = !0;
C(a, !1)
} and the Datatables request
|
If you're using Chrome, open network tab and right click the request, then copy -> copy as curl. |
cURL Request
cURL Response
|
Do you see a block of javascript that looks like https://github.com/tigrang/cakephp-datatable/blob/master/View/Helper/DataTableHelper.php#L88 in page source? Can you also provide that? |
|
hey @tigrang have you been able to figure anything out? |
Hey @tigrang
I'm not sure how active this project is still, but I am running into an issue and I can't seem to figure out why. I have followed the Basic Usage Multiple Tables exactly, and ran into the
admin_
prefix issue. I was able to solve it with information from issue #70.However, once patching that issue I have run into a datatables javascript error
TypeError: undefined is not an object (evaluating 'c.length')
Any ideas on why I am receiving this issue?
Controller
order.ctp
Index ctp
echo $this->DataTable->render('Order');
The text was updated successfully, but these errors were encountered: