D
D
des1roer2015-04-20 12:05:00
Yii
des1roer, 2015-04-20 12:05:00

Yii yiibooster + yiiheart?

I am using yiiheart 1.2 https://github.com/hscstudio/yiiheart and yiiboster 2.1.1 . But the removal in this add-on does not work. Standard generated controller

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.');
    }

and the button link is localhost/yiiHeart/engine/delete/1
how to fix it?
\\
it seems that the problem is in js boostera
NSPsZfk.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
des1roer, 2015-04-21
@des1roer

Decided a little clumsily

public function actionDelete($id)
{
Engine::model()->deleteByPk($id);

see standard delete broken
$this->loadModel($id)->delete();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question