Hi guys,

Have been trying to figure this one out for a while now, have also checked
out the bug tracker and didn't find anything conclusive so thought I'd
solicit advice from the pros. 

I've spent part of today migrating my site to the latest and greatest 1.8.4,
and all has been going well except for the integration of my action helpers.
Within my bootstrap I've added the following:

protected function _initActionHelpers()
{
    Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH .
'/controllers/helpers');                
}

(I've confirmed APPLICATION_PATH is indeed pointing to the correct location,
and that _initActionHelpers is indeed executing)

For sake of example here's an action helper I've been using, which has been
saved to my site's /application/controllers/helpers directory:

class Zend_Controller_Action_Helper_Calculator extends
Zend_Controller_Action_Helper_Abstract 
{
    public function multiply($first, $second)
    {
        return $first * $second;
    }
}

All looking good, right? So I try to call the helper within a controller
action like this:

$calculator = $this->_helper->calculator->multiply(5,4);

Without fail, I receive the following message:

Message: Action Helper by name Calculator not found 

I've tried various permutations, such as adding and configuring a helper
prefix, but nothing is working. For kicks I even moved the Calculator helper
into \library\Zend\Controller\Action\Helper and that didn't do the trick.
Surely I'm missing something rather trivial here?

Incidentally I tried this on otherwise working ZF 1.8.4-powered sites on
both Windows XP and Ubuntu, and in both cases the helper cannot be found.

Thanks!
Jason
-- 
View this message in context: 
http://www.nabble.com/Action_HelperBroker-refuses-to-add-path-in-1.8.4--tp24472950p24472950.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to