title: yii2 - How to solve Bad Request (#400) Unable to verify your data submission?
body: <p>I have a controller generated by Gii. I modify the behaviors to be like this:</p>
  
  <pre><code>public function behaviors()
  {
      return [
          'verbs' =&gt; [
              'class' =&gt; VerbFilter::className(),
              'actions' =&gt; [
                  'delete' =&gt; ['post'],
              ],
          ],
          'access' =&gt; [
              'class' =&gt; AccessControl::className(),
              'rules' =&gt; [
                  [
                      'allow' =&gt; true,
                      'roles' =&gt; ['@'],
                  ],
              ],
          ],
      ];
  }
  </code></pre>
  
  <p>When I fill the form and submit it, sometimes I get an error </p>
  
  <p><code>Bad Request (#400) Unable to verify your data submission</code></p>
  
  <p>But if I click on back button in my browser and re-submit again the form with the same value it will be okay an submitted successfully. </p>
  
  <p>I have been searching in google and stackoverflow, many of them say that the problem is on CSRF Token. But in my layout I've put <code>&lt;?= Html::csrfMetaTags() ?&gt;</code> and in my form there is <code>&lt;input type="hidden" name="_csrf" value="..."&gt;</code></p>
  
  <p>Anyone here can help me to solve this? And explain this why does it happen?</p>