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
My view.php file
<?php
$this->breadcrumbs=array(
'Reports'=>array('index'),
$model->id,
);
$this->menu=array(
array('label'=>'List Report', 'url'=>array('index')),
array('label'=>'Create Report', 'url'=>array('create')),
array('label'=>'Update Report', 'url'=>array('update', 'id'=>$model->id)),
array('label'=>'Delete Report', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
array('label'=>'Manage Report', 'url'=>array('admin')),
);
?>
<h1>View Report #<?php echo $model->id; ?></h1>
<?php
$this->widget(‘zii.widgets.CDetailView’, array(
'data'=>$model,
'attributes'=>array(
'id',
'registration',
'vehicle_type',
'violation_type',
'city',
'state',
'description',
'binaryfile',
'filename',
'filetype',
'user',
'create_time',
),
)); ?>
My _view.php file
<div class="view">
<b><?php echo CHtml::encode($data->getAttributeLabel('id')); ?>:</b>
<?php echo CHtml::link(CHtml::encode($data->id), array('view', 'id'=>$data->id)); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('registration')); ?>:</b>
<?php echo CHtml::encode($data->registration); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('vehicle_type')); ?>:</b>
<?php echo CHtml::encode($data->vehicle_type); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('violation_type')); ?>:</b>
<?php echo CHtml::encode($data->violation_type); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('city')); ?>:</b>
<?php echo CHtml::encode($data->city); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('state')); ?>:</b>
<?php echo CHtml::encode($data->state); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('description')); ?>:</b>
<?php echo CHtml::encode($data->description); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('binaryfile')); ?>:</b>
<?php echo CHtml::encode($data->binaryfile); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('filename')); ?>:</b>
<?php echo CHtml::encode($data->filename); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('filetype')); ?>:</b>
<?php echo CHtml::encode($data->filetype); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('user')); ?>:</b>
<?php echo CHtml::encode($data->user); ?>
<br />
<b><?php echo CHtml::encode($data->getAttributeLabel('create_time')); ?>:</b>
<?php echo CHtml::encode($data->create_time); ?>
<br />
</div>