Jump to content


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


  • Please log in to reply
3 replies to this topic

#1 clustersblue

clustersblue

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

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

 

 

 

 



#2 briggers

briggers

    Advanced Member

  • Members
  • PipPipPip
  • 54 posts
  • LocationBracknell, UK

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



#3 clustersblue

clustersblue

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 25 November 2013 - 02:12 AM

Thanks briggers!

 

I'll look into that routes.



#4 JOB

JOB

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 22 April 2020 - 02: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.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users