I'm attempting to update a site to CakePHP 2.5 from 2.4 but for some reason it is ignoring the routes from my plugins. I've figured out that CakePlugin::loadAll needs updating to the following:-
CakePlugin::loadAll(array(array(
'MyPlugin' => array(
'routes' => true
)
)));
However, it ignores the routes from MyPlugin (they don't appear to get loaded at all. I've got CakePlugin::routes() in my app/Config/routes.php file.
I've taken a look inside CakePlugin and CakePlugin::$_plugins seems to be setting MyPlugin['routes'] to false.
Can anyone shed any light on what's wrong here?
'ignoreMissing' => trueparam in your example. Could it be that there is a plugin with no route and it makes all the subsequent routes to not be included? you mentioned that adding the param'ignoreMissing' => truefixes your issue. why is that not ideal? - Angel S. Moreno'routes' => true, but this isn't working. Changing my code to use a global inclusion of routes with'ignoreMissing' => trueresolves the issue (fixed thanks to the comments in Rakesh's answer below). It's not ideal though as it means it will load all plugin routes even if I don't want them for a particular plugin. Hope that makes things clearer. - drmonkeyninja