⚠ 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

Problems with Grocery's actions



kuaskada
  • profile picture
  • Member

Posted 25 August 2015 - 09:49 AM

Hi!

 

I'm having problems using Grocery_CRUD. The table is displayed right, but i can't do anything actions. Add, edit, read, etc... shows the error "The page you requested was not found.".

 

In my controller:

public function __construct() {
      parent::__construct();
        $this->load->helper('html');
        $this->load->helper('download');
        $this->load->helper('file');
        $this->load->model('grocery_crud_model');
        $this->load->library('Grocery_CRUD');
        $this->load->model('Promociones_model');

   public function login_admin(){
        if ($this->input->post('pass')!='adios'){
              $this->session->set_flashdata('denegado', 'Contraseña incorrecta, acceso denegado.');
              redirect('promociones');
        } else {
              redirect('promociones/crud_promociones');
        }
   }

public function crud_promociones(){
       $crud = new Grocery_CRUD();
       $crud->set_theme('flexigrid');
       $crud->set_table('promociones');
       $crud->set_subject('promoción')->set_language('spanish');
       $crud->columns('nombre_promocion', 'imagen_promocion');
       $crud->add_fields('nombre_promocion', 'imagen_promocion');

       $crud->set_field_upload('imagen_promocion', 'assets/uploads/files');

       $output = $crud->render();

       $this->load->view('admin_crud', $output); 
}

I've been reading a lot of posts, but i haven't found anything that repairs the error. I hope someone can help me.

 

Sorry for my English. It isn't good enough.

 

Thanks a lot!!

 

Edit: The error is this:

[attachment=998:error_jquery.png]


Amit Shah
  • profile picture
  • Member

Posted 25 August 2015 - 11:25 AM

can you share the screenshot of how they are looking in?

can you check if there are javascript errors that may be occurring ..or some error that might be coming up...!! 


kuaskada
  • profile picture
  • Member

Posted 25 August 2015 - 12:00 PM

Hi!

 

I edited my previous message and added a screenshot of one error. That error appears in the console when the CRUD table is displayed.

 

If I try edit or add an item, appears a blank page with "The page you requested was not found."

 

When I try delete an item, i can see in the console another JQuery error. I'm trying upload it and the forum says "This upload failed".

 

 

I'll try write it:

 

/promociones/crud_promociones/delete/6     404 (Not Found)

 

m.ajaxTransport.send              @ jquery-1.11.3.min.js:5

m.extend.ajax                           @ jquery-1.11.3.min.js:5

(anonymous function)               @ flexigrid.js:149

m.event.dispatch                       @ jquery-1.11.3.min.js:4

m.event.add.r.handle                @ jquery-1.11.3.min.js:4

 

 

Thank you!!


kuaskada
  • profile picture
  • Member

Posted 26 August 2015 - 11:08 AM

Hi again!

 

Now, the CRUD is working, although I must display the table in another blank page. If I load the views (head, menu, footer, ...), appears "The page you requested was not found." when I try to do an action.

Maybe is there a problem with routes?

 

Regards.

Thanks.


Amit Shah
  • profile picture
  • Member

Posted 26 August 2015 - 11:33 AM

well.. is your htacces working ?? that might be the problem that it wouldnt have been allowing urls without index.php ... and in config that index.php was removed from base_url or so.. the url i see gets generated is without index.php .. so it might be a possibility.. rest ... if everything is fine and still having trouble - then yes - it might be possibility with routes..


kuaskada
  • profile picture
  • Member

Posted 02 September 2015 - 09:20 AM

Hi!

 

I have now five or six CRUD tables working fine, but I can't load the views. I tried everything I thought, and I didn´t find the trouble.

 

It isn't necessary for my application, so that I'll hold in this way.

 

Thank you for the answers, and sorry again for my English.


Amit Shah
  • profile picture
  • Member

Posted 02 September 2015 - 12:20 PM

shift your application into development environment .. from production environment (you can find the same in the index.php of the application's root folder).

Once you done with it.. u will see the application spitting out the errors .. and then u can fix them and enjoy the GC ...

 

Happy GCing :)