__fabrice (1) [Avatar] Offline
#1
Hi,

I'm back smilie to ZF, and I create a new project in ZF1.8 (ZF_Tool), withthis tutorial : "Getting Started with Zend Framework 1.8"

So, for now, I try to use the ACL (simply) like the ZFiA book in the chapter 7. I have this files :
- /library/My/Controller/Action/Helper/Acl.php
- /application/views/helpers/LoggedInUser.php.

When I put in the /applicaton/views/scripts/index/index.phtml this line : echo $this->loggedInUser();.
I've an error :

Message: Plugin by name 'LoggedInUser' was not found in the registry; used paths: Zend_View_Helper_: Zend/View/Helper/:./views/helpers/:/var/www/ZFworks/zf-mysite/application/views/helpers/
Stack trace:

#0 /usr/share/php/Zend/View/Abstract.php(1117): Zend_Loader_PluginLoader->load('LoggedInUser')
#1 /usr/share/php/Zend/View/Abstract.php(56smilie: Zend_View_Abstract->_getPlugin('helper', 'loggedInUser')
#2 /usr/share/php/Zend/View/Abstract.php(335): Zend_View_Abstract->getHelper('loggedInUser')
#3 [internal function]: Zend_View_Abstract->__call('loggedInUser', Array)
#4 /var/www/ZFworks/zf-mysite/application/views/scripts/index/index.phtml(4): Zend_View->loggedInUser()
#5 /usr/share/php/Zend/View.php(107): include('/var/www/ZFwork...')
#6 /usr/share/php/Zend/View/Abstract.php(832): Zend_View->_run('/var/www/ZFwork...')
#7 /usr/share/php/Zend/Controller/Action/Helper/ViewRenderer.php(902): Zend_View_Abstract->render('index/index.pht...')
#8 /usr/share/php/Zend/Controller/Action/Helper/ViewRenderer.php(923): Zend_Controller_Action_Helper_ViewRenderer->renderScript('index/index.pht...', NULL)
#9 /usr/share/php/Zend/Controller/Action/Helper/ViewRenderer.php(962): Zend_Controller_Action_Helper_ViewRenderer->render()
#10 /usr/share/php/Zend/Controller/Action/HelperBroker.php(276): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#11 /usr/share/php/Zend/Controller/Action.php(522): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#12 /usr/share/php/Zend/Controller/Dispatcher/Standard.php(28smilie: Zend_Controller_Action->dispatch('indexAction')
#13 /usr/share/php/Zend/Controller/Front.php(945): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#14 /usr/share/php/Zend/Application/Bootstrap/Bootstrap.php(77): Zend_Controller_Front->dispatch()
#15 /usr/share/php/Zend/Application.php(32smilie: Zend_Application_Bootstrap_Bootstrap->run()
#16 /var/www/ZFworks/zf-mysite/public/index.php(26): Zend_Application->run()
#17 {main}


I don't understand, 'cause, i create a new view helpers like the same, and i just : return "Hello ...";. And it's work.

Why ?
Thanks,
Fabrice

Message was edited by:
__fabrice
akrabat (479) [Avatar] Offline
#2
Re: View Helpers + ACL in ZF1.8 (book chap 7)
Hi,

What is the content of application/views/helpers/LoggedInUser.php?

Regards,

Rob...
franckbenoit (1) [Avatar] Offline
#3
Re: View Helpers + ACL in ZF1.8 (book chap 7)
I got the same issue : just the first letter of the name of my file LoggedInUser.php that wasn't uppercase. L and l can be hard to see.