yii2-卡特里克';s的可编辑扩展不起作用

yii2-卡特里克';s的可编辑扩展不起作用,yii2,Yii2,我正在尝试使用katrik的可编辑扩展。我得到了表的应有状态,但是当我尝试编辑一行时,我在编辑窗口中得到了这样一条消息:“InternalServerError”。在更新中,它确实起作用。有什么想法吗 我的控制器: public function actionIndex() { $searchModel = new ParticipatedinSearch; $dataProvider = /*Interviews::candidatesForIndex();*/ new Ac

我正在尝试使用katrik的可编辑扩展。我得到了表的应有状态,但是当我尝试编辑一行时,我在编辑窗口中得到了这样一条消息:“InternalServerError”。在更新中,它确实起作用。有什么想法吗

我的控制器:

public function actionIndex()
{
$searchModel = new ParticipatedinSearch;

    $dataProvider = /*Interviews::candidatesForIndex();*/
    new ActiveDataProvider([
        'query' => Participatedin::find()->joinWith('can')]);
if (Yii::$app->request->post('hasEditable')) {

    $part = Yii::$app->request->post('editableKey');
    $model = Participatedin::findOne($part);

    $out = Json::encode(['output'=>'', 'message'=>'']);

    $post = [];
    $posted = current($_POST['wId']);
    $post['wId'] = $posted;

    if ($model->load($post)) {
        $model->wId = $post['wId'];
        $model->save();

        $output = '';

        if (isset($posted['wId'])) {
           $output =  Yii::$app->formatter->asInteger($model->wId, 9);
        } 

        $out = Json::encode(['output'=>$output, 'message'=>'']);
    } 
    // 
    echo $out;
    return;
} 
我的视图索引:

$gridColumns = [

       ['attribute'=>'cId',
          'label'=>'שם המועמד',
             'value'=>function($model){
            $firstName = $model->can->idCandidate0->firstName;
            $lastName = $model->can->idCandidate0->lastName;
            $name = $firstName.' '.$lastName;
            return $name;
        }
        ],
        ['attribute'=>'cId',
          'label'=>'מוסד לימודים',
             'value'=>function($model){
            $institution = $model->can->idCandidate0->institution;


            return $institution;
        }
        ],
   // 'cpId',
    [
    'class' => 'kartik\grid\EditableColumn',
    'attribute'=>'wId', 
    'value'=>function($model){
            $name = $model->can->ws->name;
          ///  $lastName = $model->can->idCandidate0->lastName;
          //  $name = $firstName.' '.$lastName;
            return $name;
        },

    'readonly'=>function($model, $key, $index, $widget) {
       // return (!$model->cpId); // do not allow editing of inactive records
    },
    'editableOptions' => [
        'header' => 'מקום עבודה',//INPUT_DROPDOWN_LIST
        'inputType' => \kartik\editable\Editable::INPUT_DROPDOWN_LIST,
         'data'=>[ArrayHelper::map(worksites::find()->all(), 'wId', 'name')],
        'options' => [
            'pluginOptions' => ['min'=>1, 'max'=>10]
        ]
    ],
    'hAlign'=>'middle', 
    'vAlign'=>'middle',
   'width'=>'290px',
  //  'format'=>['integer', 9],
    'pageSummary' => true,

],
              [
    'class' => 'kartik\grid\EditableColumn',
    'attribute'=>'director', 
     /*'value'=>function($model){
            $name = $model->director->name;
          ///  $lastName = $model->can->idCandidate0->lastName;
          //  $name = $firstName.' '.$lastName;
            return $name;
        }, */             
    'label'=>'רכז',
    'readonly'=>function($model, $key, $index, $widget) {
       // return (!$model->cpId); // do not allow editing of inactive records
    },
    'editableOptions' => [
        'header' => 'רכז',//INPUT_DROPDOWN_LIST
        'inputType' => \kartik\editable\Editable::INPUT_DROPDOWN_LIST,
        'data'=>[ArrayHelper::map(Directors::find()->all(), 'id', 'prId')],
          'options' => [
              //'pluginOptions' => ['min'=>1, 'max'=>10]
          ]
       ],
    'hAlign'=>'middle', 
    'vAlign'=>'middle',
    'width'=>'290px',
  //  'format'=>['integer', 9],
    'pageSummary' => true,

],
];

 // the GridView widget (you must use kartik\grid\GridView)
 echo \kartik\grid\GridView::widget([
//  'firstName',

'dataProvider' => $dataProvider,

'filterModel' => $searchModel,
   'export'=>false,
'columns' => $gridColumns,

]);

尝试在可编辑小部件中使用:
'afterInput'=>Html::hiddenInput('id',$data->id),
我正在尝试,它无法识别$data变量。