-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem throw error for default controller #146
Comments
There is no line 500 in system/Controller. I'm going to guess that was actually in system/CodeIgniter.php, since that area has to do with booting the controller up. With the very latest code, I'm not getting any errors during these scenarios, but I did fix one or two smaller issues with routing last night, so that might be why. Can you try again with the latest code and see if you're still getting the same issue? |
Ye, that was actually in system/CodeIgniter.php line 500 ; |
I just made another push that, on my system, allows me to auto-route with or without namespaces. Can you check yours? If it doesn't work, please provide details on your server, OS, etc. |
Linux i686 Lubuntu 16.04, php 7.0.4 and Codeigniter4(branch::develop). |
Hm. Could you describe your app setup in detail? Here's mine, which should match the defaults currently:
|
Oh - and what file/line is giving that error now? |
Its solve now, changes commit 60effd6 have fixed this issues, Thanks. |
Non-namespaced auto-routing in sub-folders should be working now, yes. Good point about the non-existing controllers. I was so focused on getting everything else to work, I forgot a basic check to see if the file existed first. Doh! |
Non-namespaced auto-routing in sub-folders still not works. In method autoRoute(), line 405, $this->directory does not determine the directory of specific file. Before set first segment to be the controller, I think it should determine whether the first segment is sub-folder or controller; |
In method validateRequest(), line 444 : |
Good catch. Fixed in 3562895 |
case-1 = $routes->add('', 'Home::index') $this->controller has value of Home, result OK
case-2 = $routes->add('/', 'Home::index') $this->controller has value of \Home, result ErrorException line 500
case-1 = $routes->add('/', 'Home::index', ['namespace'=>'App\Controllers']) $this->controller has value of \App\Controllers\Home, result ErrorException line 500
What does line 500 really do in /system/Controller.php.
The text was updated successfully, but these errors were encountered: