VIEW file CSS not working

This is my basic form which was working perfectly before … however now after controller/create action the view does not load css. Don’t know what the problem is? All I have done different is upload a file and save its path in a database field. Here is how my view looks like. Please note list action is fine. I dont know why the output starts from <h1> tag

3134

Screen Shot 2012-08-24 at 5.26.37 PM.png

My view.php file

<?php

$this->breadcrumbs=array(

'Reports'=&gt;array('index'),


&#036;model-&gt;id,

);

$this->menu=array(

array('label'=&gt;'List Report', 'url'=&gt;array('index')),


array('label'=&gt;'Create Report', 'url'=&gt;array('create')),


array('label'=&gt;'Update Report', 'url'=&gt;array('update', 'id'=&gt;&#036;model-&gt;id)),


array('label'=&gt;'Delete Report', 'url'=&gt;'#', 'linkOptions'=&gt;array('submit'=&gt;array('delete','id'=&gt;&#036;model-&gt;id),'confirm'=&gt;'Are you sure you want to delete this item?')),


array('label'=&gt;'Manage Report', 'url'=&gt;array('admin')),

);

?>

<h1>View Report #<?php echo $model->id; ?></h1>

<?php

$this->widget(‘zii.widgets.CDetailView’, array(

'data'=&gt;&#036;model,


'attributes'=&gt;array(


	'id',


	'registration',


	'vehicle_type',


	'violation_type',


	'city',


	'state',


	'description',


	'binaryfile',


	'filename',


	'filetype',


	'user',


	'create_time',


),

)); ?>

My _view.php file

<div class="view">

&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('id')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::link(CHtml::encode(&#036;data-&gt;id), array('view', 'id'=&gt;&#036;data-&gt;id)); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('registration')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;registration); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('vehicle_type')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;vehicle_type); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('violation_type')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;violation_type); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('city')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;city); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('state')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;state); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('description')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;description); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('binaryfile')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;binaryfile); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('filename')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;filename); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('filetype')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;filetype); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('user')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;user); ?&gt;


&lt;br /&gt;





&lt;b&gt;&lt;?php echo CHtml::encode(&#036;data-&gt;getAttributeLabel('create_time')); ?&gt;:&lt;/b&gt;


&lt;?php echo CHtml::encode(&#036;data-&gt;create_time); ?&gt;


&lt;br /&gt;

</div>

Hello

It seems like you render the view form partially somewhere…

Please post your actionCreate code.

Cheers :)

Yup, I did. Thanks :slight_smile: