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

Flexigrid theme popup issue while insert and update the record #343

Open
MohammedJaffar opened this issue Dec 10, 2015 · 26 comments
Open

Flexigrid theme popup issue while insert and update the record #343

MohammedJaffar opened this issue Dec 10, 2015 · 26 comments

Comments

@MohammedJaffar
Copy link

HI
i'm using GC 1.5.2 and CI 3.0.

in popup window for add and edit required fields validator is not working
code : $crud->set_rules('name', 'Product name', 'trim|required|xss_clean');

and insert message & update message also not display.

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

Hi,
in Application\config.php set
$config['csrf_protection'] = FALSE;

@MohammedJaffar
Copy link
Author

Thanks for quick response,
csrf_protection is already false state

i attached the image
errrr

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

Send Me Application\Log.php

@beodob
Copy link

beodob commented Dec 10, 2015

@MohammedJaffar
Copy link
Author

I think the error in script side

error "Uncaught SyntaxError: Invalid regular expression: missing /"

err1

i don't have any error in log file

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

$crud->unset_jquery(); You have two connection Jquery z think ...

@MohammedJaffar
Copy link
Author

if i use $crud->unset_jquery() means popup screen(add and edit popup screen) in not working.
but validation and alert message are working fine

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

$config['csrf_regenerate'] = FALSE;
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;

@MohammedJaffar
Copy link
Author

i'm modified the config values , but still have face same problem are happened

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

Can you show code?

@MohammedJaffar
Copy link
Author

The code are below
public function offices_management()
{ $this->config->load('grocery_crud');
$this->config->set_item('grocery_crud_dialog_forms',true);
$this->config->set_item('grocery_crud_default_per_page',10);
$crud = new grocery_CRUD();
$crud->set_table('offices');
$crud->set_subject('Office');
$crud->required_fields('city');
$crud->columns('city','country','phone','addressLine1','postalCode');
// $crud->unset_jquery();
$output = $crud->render();
$this->_example_output($output);
}

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

public function offices_management()
{
$this->config->load('grocery_crud');
$this->config->set_item('grocery_crud_dialog_forms',true);
$this->config->set_item('grocery_crud_default_per_page',10);
$crud = new grocery_CRUD();
$crud->set_table('offices');
$crud->set_subject('Office');
$crud->required_fields('city');
$crud->columns('city','country','phone','addressLine1','postalCode');
// $crud->unset_jquery();
$output = $crud->render();
$this->_example_output($output);
}

You have conflict jQuery

@MohammedJaffar
Copy link
Author

jquery conflict on ajax call()
I monitoring using firbug i got this message
"SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 227 of the JSON data"

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

JSON.parse this bug just if $config['csrf_protection'] = TRUE;

@MohammedJaffar
Copy link
Author

config for csrf :
$config['csrf_protection'] = FALSE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = FALSE;
$config['csrf_exclude_uris'] = array();

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;

@MohammedJaffar
Copy link
Author

same status are here
i attached the config file
config.txt

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

reinstall GroceryCRUD

@MohammedJaffar
Copy link
Author

i reinstalled the GroceryCRUD stable version , but still have an issue

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

Try One table render();

@MohammedJaffar
Copy link
Author

currently i'm using on single table view only,
I think some script issue are there in flexgrid-add.js and flexgrid-edit.js

@beodob
Copy link

beodob commented Dec 10, 2015

Last Error, remove cookies and Comment getCookies

if ($('.flexigrid').length == 1) {   //disable cookie storing for multiple grids in one page
    var cookie_crud_page = readCookie('crud_page_'+unique_hash);
    var cookie_per_page  = readCookie('per_page_'+unique_hash);
    //var hidden_ordering  = readCookie('hidden_ordering_'+unique_hash);
    //var hidden_sorting  = readCookie('hidden_sorting_'+unique_hash);
    //var cookie_search_text  = readCookie('search_text_'+unique_hash);
    //var cookie_search_field  = readCookie('search_field_'+unique_hash);

    if(cookie_crud_page !== null && cookie_per_page !== null) {
        $('#crud_page').val(cookie_crud_page);
        $('#per_page').val(cookie_per_page);
        //$('#hidden-ordering').val(hidden_ordering);
        //$('#hidden-sorting').val(hidden_sorting);
        //$('#search_text').val(cookie_search_text);
        //$('#search_field').val(cookie_search_field);

        /*
         if(cookie_search_text !== '')
         $('#quickSearchButton').trigger('click');

        */
         $('#filtering_form').trigger('submit');
    }
}

@MohammedJaffar
Copy link
Author

still i have faced the same issue

Thanks

@beodob
Copy link

beodob commented Dec 10, 2015

Reinstall CodeIgniter

@MohammedJaffar
Copy link
Author

i reinstall both codeigniter and GroceryCRUD stable version , still have same issue

Thanks

@MohammedJaffar MohammedJaffar changed the title Flex theme popup Flexigrid theme popup issue while insert and update Dec 11, 2015
@MohammedJaffar MohammedJaffar changed the title Flexigrid theme popup issue while insert and update Flexigrid theme popup issue while insert and update the record Dec 11, 2015
@mckaygerhard
Copy link

i can confirm this issue, the problem its the flexigrid theme js there's some bugs due lack of interes of community in report and sole..

when i change the theme to datatables the problem of the inserts gone, the only problem that remain its that someting sussess message does not display or grid target dopes not refres automatically..

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

3 participants