I have CSRF check enabled.
And I got this error:
Bad Request
The CSRF token could not be verified.
The solution was add this param to linkButton method:
'YII_CSRF_TOKEN' => Yii::app()->request->csrfToken
All work ok now.
But, shouldn't this be added automactly by Chtml::linkButton()
<?php echo CHtml::linkButton('Comprar', array('submit' => '',
'params' => array('command'=>'comprar',
'codigo'=>$produto->codigo,
'YII_CSRF_TOKEN' => Yii::app()->request->csrfToken
),
'class' => 'link-1',
));
?>

Help
This topic is locked












