Search code examples
zend-frameworkzend-view

Zend framework ignores custom helper path in application.ini


I have my view helper in Library/My/View/Helper/LoadSkin.php, I added this line in application.ini : resources.view.helperPath.My_View_Helper = "My/View/Helper" but I'm still getting

Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 
'Plugin by name 'LoadSkin' was not found in the registry; used paths: Zend_View_Helper_: Zend/View
/Helper/;C:/Program Files (x86)/Zend/Apache2/htdocs/TinOuzel/application/views\helpers/' 

This looks like ZF stills looks for helper in default path ;/

My namespacje is registered in bootstrap:

protected function _initAutoloader ()
{
    $autoloader = Zend_Loader_Autoloader::getInstance();
    $autoloader->registerNamespace('My_');
    $autoloader->suppressNotFoundWarnings(true);
    return $autoloader;
}

Solution

  • in this case , you must had overridden the default view object

    in much clear example , you are using something like :

    $view = new Zend_View();

    mostly somewhere in your bootstrap file , just remove it and you would be okay