I was getting this self same error even though I had not declared any interest 
in Acl. It is not being called as a component, I am not calling any of its 
methods and the cache is completely clear.

I am posting this as I made a schoolboy error and it might help prevent others 
doing the same.

I tracked it down to the fact that in my app_controller I had:

$this->Auth->authorize = 'actions';

This is only used when you are implementing Acl as well as Auth. If you are not 
using Acl, use this:

$this->Auth->authorize = 'controller';

I made the mistake as I copied some code from the tutorial to help me set up 
Auth correctly. Of course, the tutorial also covers Acl, hence the mistake.

Jeremy Burns
jeremybu...@me.com


On 15 Jan 2010, at 16:33, Dave wrote:

> Yeah it was only in the app_controller, but I just dumped cache folder and
> seemed to clear it up. 
> 
> Thanks,
> 
> Dave
> 
> -----Original Message-----
> From: cake-php@googlegroups.com [mailto:cake-...@googlegroups.com] On Behalf
> Of scs
> Sent: January-15-10 12:51 PM
> To: CakePHP
> Subject: Re: ACL Question
> 
> Make sure you do not have
> var $components = array('Acl');
> in you app_controller or any other controllers
> 
> On Jan 14, 8:48 pm, "Dave" <make.cake.b...@gmail.com> wrote:
>> I get this error as soon as i login
>> 
>> Could not find AclComponent. Please include Acl in
> Controller::$components.
>> [CORE/cake/libs/controller/components/auth.php, line 378]
>> 
>> Fatal error: Call to a member function check() on a non-object in 
>> /home4/public_html/cake/libs/controller/components/auth.php on line 
>> 480
>> 
>> But I am not using ACL, nor do I want to. Cant seem to figure out 
>> where this is coming from or why.
>> 
>> Any ideas? No idea where to start....
>> 
>> Thanks
>> 
>> Dave
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.725 / Virus Database: 270.14.139/2620 - Release Date: 01/15/10
> 09:17:00
> 
> Check out the new CakePHP Questions site http://cakeqs.org and help others 
> with their CakePHP related questions.
> 
> You received this message because you are subscribed to the Google Groups 
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
> http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to