ZF-3160: Nesting calls to Zend_View_Helper_Action renders content from inner call twice.
Description
Nesting a call to Zend_View_Helper_Action in a call to Zend_View_Helper_Action will render the inner call twice, once before the outer call and once within it (as it should be).
In layout:
<?php echo $this->action('get', 'sidebar'); ?>That renders a view script with the following code:
The viewscript returned in <?php echo $this->action('partner', 'email'); ?> is displayed both above
<
div class="sidebar"> and within it.
If the viewscript contains the same thing, but does not echo the partner/email action (<?php $this->action('partner', 'email'); ?>), it still is rendered above
<
div class="sidebar">, but no longer inside it.
The latter scenario should not render it at all.
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2008-05-09T12:27:47.000+0000
Assigning to Ralph and scheduling for next mini release; may be fixed in trunk already.
Posted by Mike Coakley (mcoakley) on 2008-05-20T12:48:36.000+0000
Adam - you have the same issue I reported in the linked bug report (2808). I've offered a fix but there are other issues to consider as well. but to fix your problem quickly see my comments.
Posted by alexandru duduta (controloru) on 2008-06-09T07:21:26.000+0000
adding $this->resetObjects();
in the
class Zend_View_Helper_Action public function action($action, $controller, $module = null, array $params = array()) class Zend_View_Helper_Action
just before return seems to solve this issue
Posted by Ralph Schindler (ralph) on 2008-07-25T15:18:00.000+0000
Fixed by issue ZF-3456
Fixed in trunk at r10438 Fixed in 1.5.3 at r10440 Fixed in 1.6.0 at r10442