Always Submitting To Login First


<div class="row-fluid">


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

							'id'    => 'checkout_1',

							'enableAjaxValidation' => false,

							'enableClientValidation' => true,




							'htmlOptions' => array(

								'class' => 'navbar-form',




		<div id="incorrect-login" class="error-msg"></div>

		<?php echo $form->textField($model,'email',array('class'=>'span9 bg-light-grey','placeholder'=>'Username or email id*')); ?>

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


		<?php echo $form->passwordField($model,'password',array('class'=>'span9 bg-light-grey','placeholder'=>'password*')); ?>

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


		<div class="row-fluid">

			<div class="span5">

				<p><a href="#" class="grey">Forgot</a> <span class="light-grey">your password?</span></p>


			<div class="span3 offset1">


					echo CHtml::ajaxSubmitButton('Login', array('customer/login'), array(

						'type' => 'POST',

						'update' => '#user_login',

						'beforeSend' => 'function(){



						'success'=>"function(html) {

								if(html.indexOf('login_success')!= -1)


									$('#incorrect-login').text('Successfully logged in');






									if (html.indexOf('{')==0) 


										e = jQuery.parseJSON(html);

										jQuery.each(e, function(key, value) { 

											jQuery('#checkout_1 #'+key+'_em_').show().html(value.toString());



									$('#incorrect-login').text('Invalid username or password');


								return false;



							array("class" => "btn-black pull-right")





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


This is my form which is loaded in modal via ajax. Everything looks fine but the form is always to posted to login twice. This has caused the error ‘session_regenerate_id(): Session object destruction failed’

can anyone plz help me?


[color="#006400"]/* Moved from Bug forum because that forum is for bugs in Yii, not bugs in your code … */[/color]