In Symfony1.4, when I created and tried to use a form, an error occurred.
■ Error Content
csrf token: Required.
■ Solution
The cause was not outputting hidden fields within the form.
Writing the following content within the form resolves the issue:
renderHiddenFields() ?>
That’s all.
【Reference】
・さぼてん: 【symfony】_csrf_tokenとsetWidgets() (Cactus: [symfony]_csrf_token and setWidgets())
・symfonyでCSRFがうまく動かない | OKWave (CSRF Doesn’t Work Well in symfony | OKWave)
・symfony1.2のCSRF対策について : アシアルブログ (About CSRF Countermeasures in symfony1.2 : Asial Blog)
・csrf_secretを設定している場合のフォーム生成メモ - 偏った言語信者の垂れ流し (Form Generation Memo When csrf_secret is Set - Biased Language Believer’s Rambling)
That’s all from the Gemba.