Chapter 6: Returning back to the owner and requester dropdowns


as i see my problem is related to the version differences also, like for many of us. i was also following the book and the code was not working at Chapter 6: Returning back to the owner and requester dropdowns, page 119. when clicking on create issue at project 1 it gave me this error:


IssueController contains improperly nested widget tags in its view "C:\wamp\www\trackstar\protected\views/issue\_form.php". A CActiveForm widget does not have an endWidget() call.

i noticed that there are differences between the sample code and what gii has generated. with the sample code it is working, but i don’t really understand the differences and i believe gii was not generating the code to be downgraded back to 1.1.2 so i would be very happy if someone could explain the differences regarding to this section of this chapter, and so i could actualize the book code to the present release version 1.1.5.


Instead of writing with deep details, what the problem is, could you simple paste examples of both codes - the one that is in a book (not every one has access to it) and the one generated by Gii. Or in other words - the one that is working and the one that isn’t?

From the error you cited I can tell that this is a quite common errors that appears if you use any widget that requires beginWidget, contents in between and endWidget and you omit the last one (i.e. widget’s closing tag). And this error rather has nothing to do with changes in versions of Yii. But I might be wrong.

at last!

thanks! there is no missing endWidget as i can see. the problem is, that there are quite a lot of differences and i don’t have the knowledge to decide which one is important and which one is not so. anyway i think it would be a little bit too much to paste the code here. a solution could be to get the book or to meet somebody who has the book and ask him about the problem.