I am new to yii and following the Agile web development book. I have followed all the instructions so far and had no problem until then end of page 131.
I get this warning
Missing argument 1 for ProjectController::loadModel(), called in C:\wamp\www\trackstar\protected\controllers\ProjectController.php [color="#FF0000"]on line 56 and [/color]defined
/**
Displays a particular model.
*/
public function actionView()
{
$issueDataProvider=new CActiveDataProvider('Issue', array(
'criteria'=>array(
'condition'=>'project_id=:projectId',
'params'=>array(':projectId'=>$this->loadModel()->id), //[color="#FF0000"]This is line 56[/color]
),
'pagination'=>array(
'pageSize'=>1,
),
));
$this->render('view',array(
'model'=>$this->loadModel(),
'issueDataProvider'=>$issueDataProvider,
));
The URL is correct. I am using the same URL. There are 2 projects and there is 1 issue attached to each project by following the whole procedure in the book. I have re-checked the code many times, it all looks to be correct. I think may be I missed some thing but I cant figure out what.