0
votes

Hy Somebody!

I have a question I want to solve in Zend Framework. The situation is the following: I have an indexController, where I placed a getAktGroupMailAction - what is on my ACL - like here:

public function getAktGroupMail(){
    $ggroup = new Application_Model_DbTable_Groups();
    //return $groupN = $ggroup->getUserAktGroupMail();      
}

If I don't put "//" characters before the word "return" I get the error messages:

Fatal error: Uncaught exception 'Zend_Acl_Exception' with message 'Resource 'error' not found' in /var/www/hobu/library/Zend/Acl.php:365 Stack trace: #0 /var/www/hobu/library/Zend/Acl.php(846): Zend_Acl->get('error') #1 /var/www/hobu/application/plugins/AccessCheck.php(19): Zend_Acl->isAllowed('user', 'error', 'error') #2 /var/www/hobu/library/Zend/Controller/Plugin/Broker.php(309): Application_Plugin_AccessCheck->preDispatch(Object(Zend_Controller_Request_Http)) #3 /var/www/hobu/library/Zend/Controller/Front.php(941): Zend_Controller_Plugin_Broker->preDispatch(Object(Zend_Controller_Request_Http)) #4 /var/www/hobu/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch() #5 /var/www/hobu/library/Zend/Application.php(366): Zend_Application_Bootstrap_Bootstrap->run() #6 /var/www/hobu/public/index.php(26): Zend_Application->run() #7 {main} Next exception 'Zend_Controller_Exception' with message 'Resource 'error' not found#0 /var/www/hobu/library/Zend/Acl.php(846): Zend_Acl->get('error') #1 /va in /var/www/hobu/library/Zend/Controller/Plugin/Broker.php on line 312

Somebody could help me?

1

1 Answers

0
votes

You've not included the code for your 'Access Check' plugin which is what's generating the error, but I'm guessing what this does is call Zend_Acl using the current controller/action name. If so, the underlyng problem is not ACL related. Your $groupN = $ggroup->getUserAktGroupMail() is throwing an exception, which is causing the request to be routed to the error controller. Since you've not setup a resource called 'error', this then generates an ACL error when it checks whether the user can access that controller.

I'd suggest you modify your access check plugin so it does not check permissions if the controller name is 'error'. This should get rid of your ACL error message and let you see and fix the underlying problem.