⚠ 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

http://localhost/kaizen/ajax_list_info 404 Not Found



clustersblue
  • profile picture
  • Member

Posted 22 November 2013 - 11:22 AM

I stumble into this issue today.  

 

I have this function inside my controller kaizen 

index(){
   $this->main();
}

main(){
   $this->kaizen();
}

function kaizen(){
                $crud = $this->grocery_crud;
                
                $crud->set_table('kaizen')
                     ->set_subject('Kaizen');

                $crud->display_as('KaizenId','ID')
                     ->display_as('ProposalTitle','Proposal')
                     ->display_as('ProposedBy','Proposed by')
                     ->display_as('WasteCategory','Waste')
                     ->display_as('PotentialCostSavings','Cost Saving')
                     ->display_as('DateProposed','Date Proposed');

                $crud->columns('KaizenId','ProposedBy','ProposalTitle','Objectives','CurrentMethod','DateProposed','WasteCategory','PotentialCostSavings');
                $crud->required_fields('ProposalTitle','DateProposed');
                $crud->unset_add();
                $crud->unset_edit();
                $crud->unset_delete();
                $crud->unset_texteditor('Objectives','CurrentMethod','ProposedMethod','Implementor','EvalComments','FirstComments','SecondComments','ProcessComments');
                                
                $output = $crud->render();
                $this->firephp->log($output,"output");
                $this->load->view('main_view',$output);
        }

When I call this function directly like this: http://localhost/kaizen/ the GC table load successfully however firebug issues the said error.

 

However, if I called it from http://localhost/kaizen/kaizen the GC table and all its functions work fine.

 

Is there a way we could run grocerycrud using the former?

 

Thanks

 

 

 

 


briggers
  • profile picture
  • Member

Posted 22 November 2013 - 11:44 AM

Hi,

 

I'm not sure why you have 

index(){
   $this->main();
}

main(){
   $this->kaizen();
}

I'd remove them.

 

But if you set a route in CI (application/config/routes.php)

$route['kaizen'] = 'kaizen/kaizen';

it should work correctly


clustersblue
  • profile picture
  • Member

Posted 25 November 2013 - 02:12 AM

Thanks briggers!

 

I'll look into that routes.


JOB
  • profile picture
  • Member

Posted 22 April 2020 - 14:09 PM

Hey, this error appears mostly if you have note set the theme. like in my case I set ;

 $crud = new grocery_CRUD();
 $crud->set_theme('datatables'); //or any other theme you want...

Try this out and tell us.