Monday, January 31, 2011

Re: app_controller not allowing inheritance into child controllers for Auth ?

On Mon, Jan 31, 2011 at 4:02 PM, OldWest <jason@jasonwydro.com> wrote:
> I have my UsersController which of course extends my app_controller.
>
> In my app_controller I have my $components defined as such:
>
> $components = array('Acl', 'Auth', 'Session', 'RequestHandler');
>
> When I try to access my users index view, I get an error (which means that
> the Auth component has not been activated in the controller).
>
> BUT
>
> If I place this line direct in my UsersController:
>
> $components = array('Acl', 'Auth', 'Session', 'RequestHandler');
>
> The page works as expected.
>
> My remote server has the latter issue. But my local dev environment seems to
> extend the $components from the app_controller just fine.
>
> Does anyone know why this is happening? My local server is running php5.3
> and my remote is running php5.2.

Does UsersController extend app_controller, or AppController? It
should be the latter. Also, if you have a beforeFilter method, make
sure it calls parent::beforeFilter() so the AppController method is
run.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate