Home > Symfony 1.3 & 1.4 > _csrf_token [CSRF attack detected.] using sfAdminThemejRollerPlugin Symfony 1.4

_csrf_token [CSRF attack detected.] using sfAdminThemejRollerPlugin Symfony 1.4

Couldn’t figure out why I kept getting this error:

_csrf_token [CSRF attack detected.]

It turned out that it was a bug in sfAdminThemejRollerPlugin:

plugins/sfAdminThemejRollerPlugin/data/generator/sfDoctrineModule/jroller/template/templates/_list_batch_actions.php

line: 9 from:

[?php $form = new sfForm(); if ($form->isCSRFProtected()): ?]

to:

[?php $form = new BaseForm(); if ($form->isCSRFProtected()): ?]

Thanks to Adrian (edsadr)

http://gestadieu.blogspot.com/2010/01/new-version-for-sfadminthemejrollerplug.html

  1. Ehsan
    June 3rd, 2010 at 15:11 | #1

    Thank u :)

  2. Fer
    August 24th, 2010 at 16:19 | #2

    Excellent! i’ve tracking this error down for hours. i wouldn’t have been able to find it in days. Thx very much.
    this should be submitted to the plugin trac, there’s a bug reported, but no response from the developer

  3. Stephen
    October 15th, 2010 at 01:28 | #3

    Seems like a great fix,
    I get the error below after selecting more than one item for batch delete, any ideas why??

    SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens

    Symfony 1.4

  4. Sean Villani
    October 18th, 2010 at 12:39 | #4

    This is most likely due to your yml file not using the correct type for a table field. Check your yml and your db to make sure they are correct. I’ve gotten this error before when i try to save a string to a int column.

  5. vijay
    May 10th, 2011 at 04:56 | #5

    Really Thanks yar. Nice inventory… :)

  1. No trackbacks yet.