Welcome Guest, Not a member yet? Register   Sign In
404
#1

(This post was last modified: 02-26-2020, 12:07 PM by Knutsford.)

I am trying to upgrade to codeignitor 3.1.6 and I am now getting a 404

This the layout of the site


-application
--controllers
---Index.html
--modules
------web
----------config
---------------routes.php
----------controllers
---------------Pages.php
----------models
----------views






The main routes.php has

$route['default_controller'] = "web/pages";
$route['404_override'] = 'web/pages';


The one under web has

$route['web'] = "pages";


In Codeigniter.php I have


Code:
if (empty($class) OR ! file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php'))
{
    $e404 = TRUE;
    echo "aaa";
    if (empty($class))
    {
        $e404 = TRUE;
        echo "qqq";
    }
    if (! file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php'))
    {
       $e404 = TRUE;
       echo APPPATH.'controllers/'.$RTR->directory.$class.'.php';
       echo "rrr";
    }
}

 When I go to the site I get something like

aaaqqq/home/blaa/blaa/application/controllers/../modules/web/controllers/.phprrr


It isn't finding a class and it has /controllers before modules



The problem is obviously that is isn't finding a class but I have no idea why or where to look. Thanks


I have just changed

$route['default_controller'] = "web/pages";

$route['404_override'] = 'web/pages';

to

$route['default_controller'] = "web/Pages";

$route['404_override'] = 'web/Pages';



Which sends it to the right place but I have got the original problem back that it is ignoring _remap


public function _remap()

    { 

}

is the _remap() call
Reply
#2

The default controller cannot be in a sub folder.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

But that is how the current 2.2.1 version works. I didn't write it.
Reply
#4

(This post was last modified: 02-27-2020, 04:39 AM by InsiteFX.)

Your web site seems to be using HMVC Modules which means if you are upgrading to CI 3.1.x
you also need to upgrade the HMVC Module code.

If you read your other topic I told you that there are all kinds of fixes for HMVC that need to be made.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

(02-27-2020, 04:37 AM)InsiteFX Wrote: Your web site seems to be using HMVC Modules which means if you are upgrading to CI 3.1.x
you also need to upgrade the HMVC Module code.

If you read your other topic I told you that there are all kinds of fixes for HMVC that need to be made.
I have got it working at last. I moved the contents of _remap to function index then there was a missing function call in Front_Controller plus umpteen msql to msqli changes as well which I already knew about. How the original one works with theat function missing I have no idea but it does.
Reply
#6

Glad to hear that you got it working.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#7

(02-27-2020, 02:59 PM)InsiteFX Wrote: Glad to hear that you got it working.
So am I. The front end is anyway. Not sorted the admin out yet. I have done upgrades before but not had problems like this.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB