I don't know what happened but at some point my form submission to save the model Students is failing. For example when I submit the form for a Student, it used to redirect to /student/33 which shows the student I just created but now it's showing 404 error. There's no error or stacktrace thrown.
How can I debug this situation? When I go to /student/22 it shows up fine. I think it must have been some change I made but can't figure out how to debug this. All I did was change the date format.
Make sure the form action is pointing to the right url. Use the action key as part of the form -
<?php $form=$this->beginWidget('CActiveForm', array(
'id'=>'add-form',
'action'=>$this->createUrl('site/student',array('id'=>$id)),
'enableAjaxValidation'=>true,
'enableClientValidation'=>false,
'clientOptions'=>array(
'validateOnSubmit'=>true,
'validateOnChange'=>false,
'validateOnType'=>true,
),
)); ?>