I have a view that calls the Yii Framework CDetailView as follows:
<?php
$model = new partialUser();
$this->widget('zii.widgets.CDetailView',array(
'data'=>$model,
'attributes'=>array(
'user_id',
'gender',
'is_smoker',
),
)
);
?>
The error I recieve is:
The asset "C:\wamp\www\wmpn\framework\zii\widgets\assets" to be published does not exist.
The partialUser model being called by the view is fairly straightforward:
public function attributeLabels(){
return array(
'user_id'=>'User',
'gender'=>'Gender',
'is_smoker'=>'Smoker?',
);
}
Are there any other attributes I need to include to ensure that CDetailView renders correctly?
That error is related to the Javascript/image assets for CDetailView not being properly published to your assets folder. It looks like the framework/zii/widgets/assets folder isn’t there (or is corrupt / unreadable in some way).
Your partialView stuff looks fine, so I don’t think that’s your problem (or at least, I don’t think that it’s causing this error 🙂