> I upgraded from CakePHP 1.2alpha to 1.2pre-beta 1.
>
> My admin routing stopped working:
> My old routing is: (in routes.php)
> Router::connect('/admin/', array('controller' => 'backend_home',
> 'action'=> 'home', 'admin'=>1));
>
> core.php:
> Configure::write('Routing.admin', 'admin');
>
> inside the controller:
> function admin_home() {
> $this->set('title', 'Main');
> }
>
>
> The Error:
> Missing Method in BackendHomeController
> You are seeing this error because the action home is not defined in
> controller BackendHomeController
>
>
> I think it's a problem in routing.php:
> Router::connect('/admin/', array('controller' => 'backend_home',
> 'action'=> 'home', 'admin'=>1));
> What should it be?
hmm, are you going to have a route for each admin function? why not just change:
Configure::write('Routing.admin', 'backend');
and name your methods:
backend_home() etc etc
Also, do you have a controller called 'BackendHome' with a method
called 'home' ? should the controller not be called 'backend'?
anyhoo, I think you want something like:
Router::connect('/admin/', array(
'controller' => 'backend_home', 'action' => 'home', 'admin' =>
true,
'prefix' => Configure::read('Routing.admin')
)
);
hth
jon
--
jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---