jonseg / crud-admin-generator

An open source tool to generate a complete backend from a MySql database.
http://crud-admin-generator.com/
MIT License
1.43k stars 441 forks source link

DataTables warning ; table id=Biens_list Ajax error #56

Open pcdev66 opened 8 years ago

pcdev66 commented 8 years ago

And at the end of the error message, I have : ' See : http://datatables.net/tn/7

According the console in google chrome developper tool, I have : 'GET http://crudadmin.local/biens/list?draw=2&co ...(very long string) ... 414 (Request-URI Too Long)' .... jquery.min.js:6

So I reconfigure apache with a larger value for LimitRequestLine without success.

If I reduce the field number in the table, I have no error. So How I can "increase" this field number in a table

Any help appreciated. Thanks

blag001 commented 8 years ago

more than changing the apache config, I think the AJAX request should have be done with POST and not GET

Could you give us a bit more information ? like on what page it happened, with what kind of table &data... and why not the source code of the page if you have

zeelz commented 8 years ago

I have the same error when I click list DataTables warning ; table id=Table01_list Ajax error

eboye commented 8 years ago

I've had the same error. Here's what I've done to make it work:

in web/controllers/table_name/index.php

change:

$vars = $request->query->all();

to:

$vars = $request->request->all();

and in:

web/views/table_name/list.html.twig

change:

ajax: "table_name/list",

to:

ajax: {
    "url": "table_name/list",
    "type": "POST"
},

This could be done during code generation. I don't know why nobody fixed this. If I have time, I'll make the changes and add pull request for this.

Edit: I've made the pull request. It was very simple thing to do :)

Here it is: https://github.com/jonseg/crud-admin-generator/pull/100

zeelz commented 8 years ago

Thanks

Regards,

Keme Kenneth Web Developer | twitter.com/zeelz [image: Keme Kenneth on about.me] http://twitter.com/zeelz

On Fri, Jul 29, 2016 at 3:39 AM, Vasilj Milošević notifications@github.com wrote:

I've had the same error. Here's what I've done to make it work:

in web/controllers/table_name/index.php

change:

$vars = $request->query->all();

to:

$vars = $request->request->all();

and in:

web/views/table_name/list.html.twig

change:

ajax: "table_name/list",

to:

ajax: { "url": "table_name/list", "type": "POST" },

This could be done during code generation. I don't know why nobody fixed this. If I have time, I'll make the changes and add pull request for this.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jonseg/crud-admin-generator/issues/56#issuecomment-236080459, or mute the thread https://github.com/notifications/unsubscribe-auth/AFWeICViYOm6PmSqjfmQDwG9eyojgbjLks5qaWfQgaJpZM4GH6pT .

mkotsovoulou commented 6 years ago

I made the change mentioned above and I still have the DataTables warning - Ajax Error while TABLENAME/list works with the following output : {"start":0,"recordsTotal":7,"recordsFiltered":7,"data":[]}