S
S
Sergey Beloventsev2016-11-16 18:00:10
Yii
Sergey Beloventsev, 2016-11-16 18:00:10

Why is a 404 error thrown when using kartik\GridView?

installed kartik\GridView connected like this

[
                'class'=>'kartik\grid\EditableColumn',
                'attribute' =>'title',
                'format'    =>'raw',
                'editableOptions'=> function ($model, $key, $index) {
                    return [
                        'header'=>Yii::t('backend','TITLE_GODS'),
                        'size'=>'md',
                        'formOptions' => ['action' => '/goods/editgoods'],
                        'inputType'=>\kartik\editable\Editable::INPUT_TEXT,
                    ];
                },
                'filterType'=>GridView::FILTER_SELECT2,
                'filter'=> $godDatas,
                'filterWidgetOptions'=>[
                    'pluginOptions'=>['allowClear'=>true],
                ],
            ],

here is the controller
use kartik\grid\EditableColumnAction;
 class GoodsController extends Controller
{
 public function actions()
    {
        return ArrayHelper::merge(parent::actions(), [
            'editgoods' => [
                'class'         =>  EditableColumnAction::className(),
                'modelClass'    =>  Goods::className(),
                'outputValue'   =>  Yii::t('backend','REDACT'),
                'outputMessage' =>  '',
            ]
        ]);
    }
    }

do not tell me where I do not catch up.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
melnikov_m, 2016-11-16
@Sergalas

403 - This access is denied
Therefore, you need to allow this ajax.
What are your rights? Is there an access control? is a csrf token passed with ajax?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question