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:
- Clear cache
- Change username and password of the admin user, clear cache
- Added
session.save_path = /var/php_sessions/to php.ini, clear cache - Delete browser cookies, clear cache
php app/console mautic:update:findphp app/console mautic:update:applyphp app/console doctrine:migration:statusphp app/console doctrine:migration:migratephp app/console doctrine:schema:update --dump-sqlphp app/console doctrine:schema:update --env=prod --forcephp app/console cache:clear* 1000 times- Checked
mymautic.com/s/sysinfofor error messages(fixed all errors) - Checked folder permissions, all green in the Folder & File Permissions tab
- Delete cache directory
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.