Skip to content
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

Grocery CRUD ADD form is not working #145

Open
andymnc opened this issue Dec 18, 2015 · 2 comments
Open

Grocery CRUD ADD form is not working #145

andymnc opened this issue Dec 18, 2015 · 2 comments

Comments

@andymnc
Copy link

andymnc commented Dec 18, 2015

php 5.6.11 and MariaDB 10.0.22
$this->output->enable_profiler(TRUE); on my method in the controller.
logged as super admin in no-cms.
trying to show a single table (no foreign keys, no connections with other tables... everything very simple) with an autoincrement id.

Grocery is showing the table, all the records, paginating them. I can edit and delete correctly. (so sql UPDATE and DELETE are working).
The problem is with the ADD functionality. It shows the form, i can put into some data, but then, if i click on save or on save and go back to the list, it does nothing.
The profiler is not showing anything, i have no new record on mariaDB anywhere.

on Config,php i have
$config['global_xss_filtering'] = FALSE;
$config['csrf_protection'] = FALSE;
$config['compress_output'] = FALSE;

If I use
$crud->unset_jquery();
in controller, then watching with Developer Tools in Chrome, I can clearly see this when i press SAVE:

Uncaught SyntaxError:
Unexpected token a
$.ajaxSubmit.success @ flexigrid-add.js:45
options.success @ jquery.form.js:150
cb @ jquery.form.js:407

If I do not use $crud->unset_jquery();
then I see a loading image instead of the ADD FORM,
and the developer tools say:
Uncaught TypeError:
$(...).numeric is not a function(anonymous function) @ jquery.numeric.config.js:2
j @ jquery-1.11.1.min.js:2
k.fireWith @ jquery-1.11.1.min.js:2
m.extend.ready @ jquery-1.11.1.min.js:2
J @ jquery-1.11.1.min.js:2

And it stays loading forever...

@goFrendiAsgard
Copy link
Owner

Do you have many to many relationship in your fields?
The problem is probably related to this issue: http://stackoverflow.com/questions/31419495/codeigniter-3-0-0-where-not-in-produces-not-for-one-column-only-in-query

You can download the latest version from github to resolve this issue.

Please let me know if the issue is still persists

@andymnc andymnc closed this as completed Jan 7, 2016
@andymnc andymnc reopened this Jan 7, 2016
@andymnc
Copy link
Author

andymnc commented Jan 7, 2016

It's a simple table with 8k+ records, 54 columns, but no relations with other tables at all.
So I don't think it's related with that.
The temporary fix for me was to change the flexigrid-add.js in /assets/grocery_crud/themes/no-flexigrid/js at line 45.
In my case after the first check at 35, the reassignment of data at 45 was always empty.
Anyway, i try now the new version that you suggest and i let you know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants