php - Codeigniter, HMVC : MX_Router is never called, resulting in 404 error -


i'm using codeigniter 2.1.3. noticed nice module called hmvc (hierarchical mvc), allows mvc development in hierarchical manner, name indicates. downloaded , installed it.

however, after doing manipulations explained in every tutorial available, 404 error when trying access test page created.

after searching while without success, decided install latest version of codeigniter (2.2.0). followed tutorial, , worked.

i decided try compare 2 versions (the 1 works, , doesn't) see sources called, , seemed fail in codeigniter v2.1.3.

i found out in version 2.1.3 of codeigniter, error happens because in function _validate_request of class /system/core/router.php, program reaches end of function because hasn't found controller class matching uri (in case localhost/codeigniter/users : suppose detect have module called users, , should use controller in application/modules/users load page). program reaches function show_404() (see below) , generates 404 error :

    // if we've gotten far means uri not correlate valid     // controller class.  see if there override     if ( ! empty($this->routes['404_override']))     {         $x = explode('/', $this->routes['404_override']);          $this->set_class($x[0]);         $this->set_method(isset($x[1]) ? $x[1] : 'index');          return $x;     }      // nothing else @ point show 404     show_404($segments[0]); 

when checking happens in version 2.2.0 (the 1 works), type of router class used : application/third_party/mx/router.php (instead of default /system/core/router.php).

i have application/third_party/mx/router.php installed.

so basically, issue somehow, codeigniter doesn't instanciate right router.php file, don't understand i've been doing wrong.

can help?

edit : progressively migrated site onto version of codeigniter hmvc works, while checking continuously if kept working. worked until migrated file application/config/config.php. must configuration issue after all.

edit 2 : didn't find root cause of issue. ended migrating whole website on new functionnal version of codeigniter, , works.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -