Skip to content
Advertisement

Tag: yii

Fatal error: Call to a member function isAttributeRequired()

I am having the following form The above form throws an error as I am new you yii framework so i am unable to guess where the error is. can anyone help Edit 1 Edit-2 If remove <?php echo $form->labelEx($model,’oldPassword’); ?> am getting error as Answer The $model variable does not contain a Model object, check if you you pass

How to create a migration in YII?

I have just started with YII and I am trying to create a new migration. I am using Xampp and it is located in the d drive of my system. The command that I am trying to use is: When I run the above command nothing happens, neither do I get an error message nor there is any error. I

Get category tree recursively (Yii)

I have a table with following structure: categories id name parent_id I want to get the tree of categories with single function. I’ve written something like this in my model, but it doesn’t work. Can someone help me with this? Thanks. Answer I’ve finally solved the issue. If someone interested, here’s the code:

CListView in Yii Framework

I have started working on yii framework and I am following the yii blog tutorial to learn basics of yii framework in this tutorial they have used a ClistView in posts view but i am getting an exception This is the code that i have used in view file: This is what my PostsController contains: I can’t find out where

“Invalid parameter number: parameter was not defined” Inserting data

I’ve been using Yii’s active record pattern for a while. Now, my project needs to access a different database for one small transaction. I thought the Yii’s DAO would be good for this. However, I’m getting a cryptic error. CDbCommand failed to execute the SQL statement: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined Here is my code: This constructs

Advertisement