I included the performAjaxValidation into my customer creation process to check if the entered email has allready bin used. This works nice in a way but the error message is only shown halve a second before the site moves on to render the view with the model id as parameter. As the customer was not saved this results in a "page not found" error.
As I understand the performAjaxValidation function the "Yii::app()->end();" should prevent this. So why is this happening?
public function actionCreate()
$model->consultantId = $this->_consultant->id;
$model->consultantId = 0;
//send user data to shop
If you are sure that $_POST[‘ajax’]===‘customer-form’ is set than it may be a client side problem. Do you use both clientSide validation AND ajaxValidation? I am really just guessing but maybe the clientSide doesn’t detect any validation error (because it can’t check the uniqueness of an email) and is therefore “allowing” a classic form submit
As I said I can see the error message for an email address already in use for halve a second before the site renders a new view (witch ends up in the 404 error). So the $_POST[‘ajax’]===‘customer-form’ work IMO.