$this->disableLocalCSRFProtection();
Showing posts with label csrf. Show all posts
Showing posts with label csrf. Show all posts
Monday, March 19, 2012
Wednesday, October 13, 2010
_csrf_token [CSRF attack detected.] error using sfAdminThemejRollerPlugin
If you try to do a batch delete with the Choose an option form, you can get a CSRF attack detection error using the sfAdminThemejRollerPlugin 0.2.0beta plugin.
Solution:
Solution:
- Edit plugins/sfAdminThemejRollerPlugin/data/generator/sfDoctrineModule/jroller/template/templates/_list_batch_actions.php and change line 9 from:
[?php $form = new sfForm(); if ($form->isCSRFProtected()): ?]
to:
[?php $form = new BaseForm(); if ($form->isCSRFProtected()): ?] - Edit plugins/sfAdminThemejRollerPlugin/data/generator/sfDoctrineModule/jroller/parts/batchAction.php and change line 29 from:
$validator = new sfValidatorDoctrineChoice(array('model' => '<?php echo $this->getModelClass() ?>'));
to:
$validator = new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $this->getModelClass() ?>')); - Type symfony cc to clear the cache.
Subscribe to:
Posts (Atom)