⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

grocery crud add/update throws 404 error insert_validation not found.



Php Power Arts

Php Power Arts
  • profile picture
  • Member

Posted 01 June 2016 - 10:11 AM

Hi i just get this error message in the firebug when try to click save this is my crud initialize code

function add()
    {

        $this->load->library('grocery_CRUD');
        //if (!$this->ion_auth->logged_in()) {
        // redirect them to the login page
        //redirect('user/login', 'refresh');
        //} else {


        $crud = new Grocery_CRUD();
        $crud->set_table('venues');
        $crud->set_subject(' ');
        $crud->unset_delete();
        $crud->unset_export();
        $crud->unset_print();
        $crud->unset_read();
        $crud->unset_edit();
        $crud->unset_back_to_list();
        $crud->unset_add_fields('v_started_date', 'v_end_date', 'v_active');

        $crud->columns('v_name', 'region_id', 'location_id', 'v_logo', 'v_addess_1', 'v_address_2', 'v_city', 'v_phone_number');
        $crud->display_as('v_name', __('Venue Name'))
             ->display_as('region_id', __('Region'))
             ->display_as('location_id', __('Location'))
             ->display_as('v_logo', __('Venue Logo'))
             ->display_as('v_address_1', __('Address 1'))
             ->display_as('v_address_2', __('Address 2'))
             ->display_as('v_city', __('City'))
             ->display_as('v_phone_number', __('Phone Number'))
             ->display_as('v_accept_agreement', '');

        $crud->set_field_upload('v_logo', 'assets/uploads/files');
        $crud->callback_add_field('v_accept_agreement', array($this, 'add_field_v_accept_agreement'));
        $crud->set_lang_string('form_save', __('Subscribe Now'));
        $output = $crud->render();
        $this->load->vars($output);
        $this->layout->render_page('venue/add');
        //}
    } 

any help please


Php Power Arts

Php Power Arts
  • profile picture
  • Member

Posted 01 June 2016 - 11:14 AM

Woooow I fixed it 

 

i just added the initialize in add function

 

so don't using function on your controller with this name (add) 

 

i hope this helps 

 

regards