Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-13-2008, 10:47 PM
Junior Member
 
Join Date: Jul 2007
Posts: 3
Default Duplicate output with nested Action View Helpers

Hi,

I am currently adapting my old code to ZF 1.5.1. I have calls to navigational elements in my Zend_Layout default view script like this:

PHP Code:
    echo $this->action('main''menu''auth');
    echo 
$this->action('main''menu''data'); 
The second call invokes - as it contains a dynamic menu - other action view helper calls:

PHP Code:
    echo $this->action('sub1''menu''data');
    echo 
$this->action('sub2''menu''data');
    echo 
$this->action('sub3''menu''data');
    echo 
$this->action('sub4''menu''data'); 
The strange thing is, that the last call of the "inner" actions (sub4) is displayed two times in the view. It looks like the last result is forwarded to the top level and displayed as result of the outer action call.

Is that a bug or a feature? Is there any way to suppress this? Is there a better approach to this?

I really appreciate any kind of input and thx in advance!
__________________
Cheers,
Vince
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 11:09 AM
Junior Member
 
Join Date: Mar 2008
Posts: 7
Default

I have the same problem. Have anybody solution to avoid this problem?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-15-2008, 12:09 PM
Junior Member
 
Join Date: Jul 2007
Posts: 3
Default Kinda solved

Quote:
Originally Posted by demi View Post
I have the same problem. Have anybody solution to avoid this problem?
According to #zftalk this is a known issue that's already been worked on - let's stay tuned till 1.5.2 arrives. :P
__________________
Cheers,
Vince
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-15-2008, 12:57 PM
Junior Member
 
Join Date: Mar 2008
Posts: 7
Default

Quote:
Originally Posted by vincent-de View Post
According to #zftalk this is a known issue that's already been worked on - let's stay tuned till 1.5.2 arrives. :P
thank's for this information!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-15-2008, 12:59 PM
Junior Member
 
Join Date: Mar 2008
Posts: 7
Default

I was create new Helper-class and called it as Zend_View_Helper_ActionRenderer. Take all class-content from Zend_View_Helper_Action, rename method action to actionRenderer and (strange) it's works!!!

Last edited by demi : 04-15-2008 at 01:03 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 04-16-2008, 09:25 AM
Junior Member
 
Join Date: Apr 2008
Posts: 4
Default

Quote:
Originally Posted by demi View Post
I was create new Helper-class and called it as Zend_View_Helper_ActionRenderer. Take all class-content from Zend_View_Helper_Action, rename method action to actionRenderer and (strange) it's works!!!
This works...

Also: the bug on Issue tracker
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 06-16-2008, 05:52 AM
Junior Member
 
Join Date: Jun 2008
Posts: 1
Default

Hi all, I'm still having the same issue despite the fact that I'm using ZF 1.5.2.. anyone else still facing the same issue?

I'm trying to avoid 'hacking' around the problem by duplicating the Zend_View_Helper_Action to Zend_View_Helper_ActionRenderer and using actionRenderer() function.. if there's a more elegant way it would be great. However the ultimate fix would be fixing the root problem in ZF..

I've also checked out ZF's Issue Tracker for this bug, and it says it's supposed to be fixed already for 1.5.2..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 09:48 PM.