Cjiudialog 500 Internal Server Error

First of all, sorry for my English.

in someview.php I have the following code, basically I create a link with a url to a controlerID / accionID, and that should open a modal CJuiDialog given widget in a div (in this case propiedadDialog)




<?php

echo CHtml::ajaxLink(

 	Yii::t('sacApp', 'Add Propiedad'),

 	$this->createUrl("propiedad/addNew", array("idgrupo"=>$model->id)),

 	array(

 	 	'onclick'=>'$("#propiedadDialog").dialog("open"); return false;',

 	 	'update'=>'#propiedadDialog'

 	),

 	array(

 	 	'id'=>'showPropiedadDialog',

 	)

);

?>

<div id="propiedadDialog"></div>



This is the code of my action in the controller(PropiedadController.php)




<?php

	public function actionAddNew($idgrupo, $_)

	{

		$model = new Propiedad;

		

		$this->performAjaxValidation($model);

		

		$flag = true;

		if(isset($_POST['Propiedad'])){

			$flag = false;

			$model->attributes=$_POST['Propiedad'];

			$model->idgrupo=$idgrupo;

			//Do something before save

			if($model->save()){

				

			}

		}

		if($flag){

			if(defined('YII_DEBUG')){

				Yii::app()->clientScript->scriptMap['jquery.min.js'] = false;

			}else{

				Yii::app()->clientScript->scriptMap['jquery.js'] = false;

			}

			$this->renderPartial('createDialog', array('model'=>$model), false, true);

		}

	}

?>



This is the createDialog.php called from the Controller




<?php

	$this->beginWidget('zii.widgets.jui.CJuiDialog',

	array(

		'id'=>'propiedadDialog',

		'options'=>array(

			'title'=>Yii::t('propiedad', 'Create Propiedad'),

			'autoOpen'=>true,

			'closeOnEscape'=>true,

			'modal'=>'true',

			'width'=>'auto',

			'height'=>'auto',

		),

	),

);

echo $this->renderPartial('_formDialog', array('model'=>$model));

$this->endWidget('zii.widgets.jui.CJuiDialog');

?>



Y este el _formDialog.php llamado desde createDialog.php




<?php

/* @var $this PropiedadController */

/* @var $model Propiedad */

/* @var $form CActiveForm */

?>


<div class="form">


<?php $form=$this->beginWidget('CActiveForm', array(

	'id'=>'propiedad-form',

	'enableAjaxValidation'=>true,

)); ?>


	<p class="note">Fields with <span class="required">*</span> are required.</p>


	<?php echo $form->errorSummary($model); ?>


	<div class="row">

		<?php echo $form->labelEx($model,'descripcion'); ?>

		<?php echo $form->textField($model,'descripcion',array('size'=>60,'maxlength'=>150)); ?>

		<?php echo $form->error($model,'descripcion'); ?>

	</div>


	<div class="row buttons">

		<?php //echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>

		<?php echo CHtml::ajaxSubmitButton(

			Yii::t('propiedad', 'Create Propiedad'),

			CHtml::normalizeUrl(array('propiedad/addnew', 'render'=>false)),

			array(

				'succes'=>'js:function(data){

					$("#propiedadDialog").dialog("close");

				}'

			),

			array(

				'id'=>'closePropiedadDialog'

			),			

		);?>

	</div>


<?php $this->endWidget(); ?>


</div><!-- form -->



The problem I have is that when I click on the ajaxLink that must open the modal CJuiDialog, I returned the error "500 Internal Server Error"

Looking with FirePHP (Debugger), when I click on the link generated with the ajaxLink, the execution reaches the method CBaseController::renderInternal()




	public function renderInternal($_viewFile_,$_data_=null,$_return_=false)

	{

		$miFire = FirePHP::getInstance(true);

		$miFire->setEnabled(true);

		// we use special variable names here to avoid conflict when extracting data

		if(is_array($_data_))

			extract($_data_,EXTR_PREFIX_SAME,'data');

		else

			$data=$_data_;

		

		if($_return_)

		{

			ob_start();

			ob_implicit_flush(false);

			require($_viewFile_);

			return ob_get_clean();

		}

		else

			require($_viewFile_);

	}



In this case, the execution enters the If, and instruction require ($ viewFile) fails

Some help???

All is fine, my error.

A comma that remains in the file createDialog.php




<?php

        $this->beginWidget('zii.widgets.jui.CJuiDialog',

        array(

                'id'=>'propiedadDialog',

                'options'=>array(

                        'title'=>Yii::t('propiedad', 'Create Propiedad'),

                        'autoOpen'=>true,

                        'closeOnEscape'=>true,

                        'modal'=>'true',

                        'width'=>'auto',

                        'height'=>'auto',

                ),

        ),// Here the comma

);

echo $this->renderPartial('_formDialog', array('model'=>$model));

$this->endWidget('zii.widgets.jui.CJuiDialog');

?>