ZF-9465: Zend_Application_Resource_View doesn't use static helper broker (new discussion over the bug #ZF-8778)

Issue Type: Bug Created: 2010-03-18T09:51:39.000+0000 Last Updated: 2011-07-30T03:24:50.000+0000 Status: Closed Fix version(s): - 1.11.10 (04/Aug/11)

Reporter: Stephan Kountso (steplg) Assignee: Ramon Henrique Ornelas (ramon) Tags: - Zend_Application_Resource

Related issues: Attachments: - diff.patch


In bug #ZF-8770 Andrew Stoltz asked to fix using "new view renderer" instead of calling static one.

why did this bug marked as "not an issue"?

i have a big problem with it in such case: in application.ini I setup:

<pre class="highlight">
resources.view.helperPath.CU_View_Helper = APPLICATION_PATH "/views/helpers/CU/View/Helper"
resources.view.helperPath.ZendX_JQuery_View_Helper = ZendX/JQuery/View/Helper

then in bootstrap class:

<pre class="highlight">
protected function _initActionHelpers() {
    Zend_Controller_Action_HelperBroker::getStaticHelper('contextSwitch')->AddContext('widget', Array('suffix'=>'widget'));

after this all queries with '&format=widget' have wrong output! ViewRenderer output *.phtml template instead of *.widget.phtml

if move contextSwitch initializer in another place (for example in controller init function) all work ok.

such behaviour explains by ContextSwitch helper call

<pre class="highlight">

only once and store pointer to in as a private attribute. and if it happens before Zend_Controller_Action_Helper_ViewRenderer called, it causes errors.


Posted by Stephan Kountso (steplg) on 2010-03-18T09:59:11.000+0000

added patch to fix problem

Posted by Ramon Henrique Ornelas (ramon) on 2011-07-30T03:24:50.000+0000

Fix with issue ZF-11579.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.