Yo. I have a few controllers, they work as expected, but now when I added a new one, it is ignored by the framework, and the last two hours of troubleshooting have been unrewarding. I can't find anything wrong. What happens is that the IndexController::indexAction() is loaded.
- The controller is named "InspiremeController" (I'd like to call it "InspireMeController", but I'm unsure how to handle camel case in routing, please advise here as well).
- I've added this route (if I change the controller / action to other ones I run, it works):
// Add route to inspire-me page. $router->add( "/inspire-me", array( "controller" => "inspireme", "action" => "test" ) );
- I've ensured that the controller / action can be found like this (in index.php, before instantiating the router): var_dump(class_exists("InspiremeController")); --> bool(true)
$c = new InspiremeController(); var_dump(method_exists($c, "testAction")); --> bool(true)
The InspiremeController currently holds indexAction and testAction (to try names), and both just try to die. Still, the IndexController::indexAction() is loaded and processed.
Why doesn't it work?
Best regards, dimhoLt
Update: it doesn't matter what I name the controller. All new controllers are ignored, even though they're correctly named and placed in the source. I've restarted the servers and everything. I've tried to add on both my work stations with exactly the same result, both run Mac OSX.
How can I troubleshoot?