scoumbourdis / grocery-crud

Grocery CRUD is a PHP Codeigniter Framework library that creates a full functional CRUD system without the requirement of extra customisation to the JavaScripts or the CSS to do it so.
http://www.grocerycrud.com
GNU General Public License v3.0
1.01k stars 472 forks source link

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

Open MohammedJaffar opened 8 years ago

MohammedJaffar commented 8 years ago

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 commented 8 years ago

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

MohammedJaffar commented 8 years ago

Thanks for quick response, csrf_protection is already false state

i attached the image errrr

Thanks

beodob commented 8 years ago

Send Me Application\Log.php

beodob commented 8 years ago

See http://www.grocerycrud.com/forums/topic/602-multiple-grids-in-one-page/

MohammedJaffar commented 8 years ago

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 commented 8 years ago

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

MohammedJaffar commented 8 years ago

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 commented 8 years ago

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

MohammedJaffar commented 8 years ago

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

Thanks

beodob commented 8 years ago

Can you show code?

MohammedJaffar commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

MohammedJaffar commented 8 years ago

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 commented 8 years ago

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

MohammedJaffar commented 8 years ago

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

Thanks

beodob commented 8 years ago

reinstall GroceryCRUD

MohammedJaffar commented 8 years ago

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

Thanks

beodob commented 8 years ago

Try One table render();

MohammedJaffar commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

still i have faced the same issue

Thanks

beodob commented 8 years ago

Reinstall CodeIgniter

MohammedJaffar commented 8 years ago

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

Thanks

mckaygerhard commented 8 years ago

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..