Discrepancy between book and book's code???

On page 210, it says this

“One other small change we made as to add a simple link from the project details page so we could access this form form the application. The following line was added to the project show.php view file’s list of link options:”

[<?php echo CHtml::link('Add User To Project',array('adduser','id'=>$m odel->projectId)); ?>]

First, I cannot find a


file in the source code that I got with the book, so that’s one problem.

Second, assuming that show.php might actually be /views/project/view.php, there’s a discrepancy because view.php has



	$this->menu[] = array('label'=>'Add User To Project', 'url'=>array('adduser', 'id'=>$model->id));


Anyways, when I put this into my view.php, the link doesn’t show up. I’m wondering if it could be related to the problem I have in the next thread, about the CDbException

I think the referenced show.php must be view.php as there isn’t an actionShow() method in the Controller, either.

It’s possible that the link not showing is due to the CDbException, as you’re referencing $model. As a check, does it show if you link to:

$this->menu[] = array('label'=>'Add User To Project', 'url'=>array('adduser'));


Please refer to items 13 and 14 in the thread on known identified issues:

identified issues