Can’t submit form on symfony 3.4 and docker (maybe csrf token, session, cookie…)

I have a symfony 3.4 app that works perfectly in production.

I try to install it in dev mode (in local) for that I use docker on a virtual machine (ubuntu). The app works (I can access the frontend anywhere I don’t need to be loggued) but when I try to send a form I get an error. None works.

  • When I submit a form from craueFormFlow, I get an error of this type : craueFormFlow.flowExpired
  • When I submit a basic form, I get : The CSRF token is invalid. Please try to resubmit the form.
  • And when I submit the login form from FOS bundle (I know it’s no longer recommended, but I can’t change it if my env doesn’t work), there is no logging error.

I think it’s a problem with the csrf token but I don’t know which one (or with session, cookie or other strange thing). I don’t have a DEV_SESSID cookie created (no cookies created) when I navigate on the website, I don’t know if it’s related.

Environment :

  • PHP 7.4.13
  • Docker version 19.03.14
  • Ubuntu 20.10, 20.04, 18.04 tested

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *