Jump to content

Tables are showing, but I'm getting 404 when calling functions !

404 errros routes

  • Please log in to reply
1 reply to this topic

#1 hugoboxx



  • Members
  • Pip
  • 1 posts

Posted 10 December 2014 - 04:41 PM

Hello everyone,


I'm new to GC, I've been building a site for a couple of months and everything is working fine, recently I decided to improve its functionality by including some CRUD tables via GC.


I've loaded a sample MYSQL table shown in one of the GC tutorials and I put all the files into the right CI folders. I've created a new method into a controller and I send the $output given by the render to the view, and that worked ok. So I can see the table, with the rigth css theme, buttons, links etc. However, I have a BIG PROBLEM, as none of the CRUD functions works I'm only getting 404 errors.


The controller I've got is this (I got several controllers, but the CRUD tables are for the admin only):

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class User_admin_controller extends CI_Controller {

     function __construct()
     public function hour_range()
        $output = $this->grocery_crud->render();
    function sendhourangetoview($output = null)

for information I have a line into my routes.php

 $route['hour_range'] = 'user_admin_controller/hour_range';

and  on my config.php i've got some of this:

$config['url_suffix'] = '.html';
$config['base_url']    = 'http://localhost/geoda/';

the url that I see when pointing to one of the "edit buttons" is this


to the view button:


to the add button:



Somehting tells me there is something to do with the routes (which are normally working fine) So, I've tried changing the 'base_url' for GC using the set_crud_url_path function, but nothing seems to work... :(


The only thing i can say is....PLEASE HELP!! I'm really a hand with this!

#2 Amit Shah

Amit Shah

    grocery CRUD Master

  • Advanced Member
  • PipPipPip
  • 1,192 posts
  • LocationMumbai, India

Posted 11 December 2014 - 04:31 AM

well i will not recommend u mingling around with routs on the basis with grocery crud... cuz may times gc looks up @the url and not the base class / method..

hence will be best to leave it unrouted

Also tagged with one or more of these keywords: 404, errros routes

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users