I added Helper path '/application/view/helpers' but my real path was
/application/default/view/helpers'
I didn't notice my mistake since it was going good before using zf1.6. I
don't know either what should be the regular loader behavior when omiting
the default module but anyway, I added the default folder to my path and now
it works a charm!
Thanks
Matthew Weier O'Phinney-3 wrote:
>
> -- Benjamin Frydman <benjamin.frydman@gmail.com> wrote
> (on Wednesday, 03 September 2008, 10:05 AM -0700):
>> I just tried the zend framework 1.6 release this morning and I can't
>> figure
>> out why I have this exception:
>>
>> Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message
>> 'Plugin
>> by name MyCustomHelper was not found in the registry.
>>
>> I only replaced the old zend folder by the new one in my library
>> directory.
>> No code change.
>>
>> Any idea?
>>
>>
>> Despite the exception Message, the problem comes from my customs view
>> helpers. Why my view helpers don't load correctly anymore?
>>
>> Here is the code ( working in the 1.5 release)
>>
>> $view->addHelperPath(array(self::$root .
>> '/application/view/helpers',self::$root .
>> '/library/MyZend/View/Helper'),'MyZend_View_Helper_');
>>
>> class MyZend_View_Helper_MyCustomHelper{
>> public myCustomHelper($param)
>> { ... }
>> }
>
> Can you provide the filenames and the class names of some helpers you
> use, as well as the code you use to invoke them? I've been using custom
> helpers myself with the 1.6 branch for months without issue, so I'm
> curious to see what could be causing the behavior you're seeing.
>
> The information I need is like this:
>
> application/
> view/
> helpers/
> Foo.php => MyZend_View_Helper_Foo
> library/
> MyZend/
> View/
> Helper/
> Bar.php => MyZend_View_Helper_Bar
>
>
> // in view script:
> <?= $view->bar() ?>
>
> That will let me better understand your usage so I can attempt to
> reproduce the issue.
>
> --
> Matthew Weier O'Phinney
> Software Architect | matthew@zend.com
> Zend Framework | http://framework.zend.com/
>
>
--
View this message in context: http://www.nabble.com/custom-view-helpers-don%27t-work-anymore-in-zf-1.6-tp19293547p19296282.html
Sent from the Zend MVC mailing list archive at Nabble.com.
没有评论:
发表评论