I get this error every time I try to do anything in Mautic, e.g. Save a form, change password, etc. I have just migrated and updated Mautic into a new environment, based on the official mautic/mautic image from Dockerhub. I also changed the domain name.
Correct error message:
CSRF token error. Try to refresh the page and try again.
Here are some things I've tried to fix this:
session.save_path = /var/php_sessions/
to php.ini, clear cachephp app/console mautic:update:find
php app/console mautic:update:apply
php app/console doctrine:migration:status
php app/console doctrine:migration:migrate
php app/console doctrine:schema:update --dump-sql
php app/console doctrine:schema:update --env=prod --force
php app/console cache:clear
* 1000 timesmymautic.com/s/sysinfo
for error messages(fixed all errors)Yes, kind of some tricks ol' Google tipped me about. Now I'm out of ideas. Or maybe 2 ideas left, because I changed the domain name, the CSRF-token is not happy :( how do I fix?
Or, Because I'm using Nginx as a loadbalancer so that the CSRF token gets lost on the way(But I was using the same setup before 🤔).
Been trying to solve this for like 5 hours now, going mad. Gonna take a break from that now and hopefully some fellow stackoverflower has some nice brainstorming ideas.
Ok, I found my error. After migrating I accidentally overwrote the new media/js/app.js
with the old one. 🤦🏻♂️