简体   繁体   中英

No success message when adding/updating/go back to the list in grocery crud

I'm using Codeigniter and Grocery Crud for a project. The crud seems to be working fine but the problem is that when I try to add values, I don't get the success message. Instead I get a textbox like below

在此输入图像描述

I tried reinstalling the crud from scratch but still the same.

add and update doesn't show the success message and when I click on update and goto to the list nothing happens.

Can someone please help me on this?

Actually it is good to ask, as it is a common error on grocery CRUD when there is a JavaScript error. This is mainly a problem when there is a JavaScript error at the previous page.

For example when you are at your add form . For example: http://www.grocerycrud.com/demo/offices/add check your firebug to see if there is any JavaScript error. This is mostly happen when you have the jquery or the jqueryUI already at your JavaScripts . If so then to prevent the conflict, a simple line of code can release you from the searching. You can simply do:

$crud->unset_jquery(); //This will unset the Jquery library to load 

or:

$crud->unset_jquery_ui(); //This will unset the Jquery UI library to load 

If you are still having problems, check your JavaScripts and try to remove some plugins that can cause this problem. Some times it happens when the Twitter Bootstrap is installed, but just the unset_jquery() method could do the job.

And something lastly I am not sure but I think that the latest grocery CRUD version is not compatible with Jquery v.1.9.0 . So if you are using Jquery 1.9.0, try to switch to a previous version eg 1.8.3 or you have to wait for the major release of grocery CRUD v.1.4 that will support Jquery v.1.9.0 .

In case anyone is running into this issue I believe this is a Template issue but with no more time to diagnose I simply set the success_message to null in the update_layout function in the Grocery_CRUD.php library.

This eliminates the error but of course, does not include the success message.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM