yoursurrogategod Posted January 11, 2013 Share Posted January 11, 2013 Here are my files. The view: http://bin.cakephp.org/view/542541964 The controller: http://bin.cakephp.org/view/132354357 The form: http://bin.cakephp.org/view/40623455 Now, when I run this, this is the text that I see: entering view asdfasfasd exiting view ENTER - buildAffiliateSelectForm - Application_Form_Input EXIT - buildAffiliateSelectForm - Application_Form_Input Why is my controller (action, in this case) is executing after the view? This doesn't make any sense. Quote Link to comment https://forums.phpfreaks.com/topic/273037-zf-112-controller-runs-after-the-view-the-forms-are-not-getting-created/ Share on other sites More sharing options...
trq Posted January 12, 2013 Share Posted January 12, 2013 It's not executing afterward, but is displaying afterward. The view layer uses various pieces of buffer trickery to do it's job. Hence, output outside of a view is not recommended. What exactly is the issue you are trying to solve? Quote Link to comment https://forums.phpfreaks.com/topic/273037-zf-112-controller-runs-after-the-view-the-forms-are-not-getting-created/#findComment-1405065 Share on other sites More sharing options...
yoursurrogategod Posted January 14, 2013 Author Share Posted January 14, 2013 (edited) It's not executing afterward, but is displaying afterward. The view layer uses various pieces of buffer trickery to do it's job. Hence, output outside of a view is not recommended. What exactly is the issue you are trying to solve? Basically, what I'm trying to do is have the form elements (Zend_Form_Element_Select, for example) to show up in my view. This used to work (I swear), but suddenly they stopped working. And I don't know why. In the example above, I should see a drop down (even if it's not populated at all and has only 1 item in it). [edit] Fixed the size of the text. Edited January 14, 2013 by yoursurrogategod Quote Link to comment https://forums.phpfreaks.com/topic/273037-zf-112-controller-runs-after-the-view-the-forms-are-not-getting-created/#findComment-1405582 Share on other sites More sharing options...
yoursurrogategod Posted January 15, 2013 Author Share Posted January 15, 2013 Ok, putting a parent::__construct($options); in the constructor did it. $options were set by default to null. Quote Link to comment https://forums.phpfreaks.com/topic/273037-zf-112-controller-runs-after-the-view-the-forms-are-not-getting-created/#findComment-1405882 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.