Invalid request. Please do not repeat this request again

When I am trying to delete a row in my details/admin panel I am getting


Invalid request. Please do not repeat this request again

How can I solve this?

Any Ideas?

Use POST, not GET.

i am using


public function actionDelete($id)

	{

		if(Yii::app()->request->isPostRequest)

		{

			// we only allow deletion via POST request

			$this->loadModel($id)->delete();


			// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser

			if(!isset($_GET['ajax']))

				$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));

		}

		else

			throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');

	}



Still getting the same error

Take a closer look at that function.

It’s what I said: you should use POST. Otherwise the message will trigger.

All destructive actions should use POST.

Then why is not using post I have the same code on my localhost and it works fine.