The error "Invalid Form Key. Please refresh the page." appears when submitting the contact form.
I just don't know how to handle this. :( In my opinion, this must not even be supposed to happen. How can I get rid of this error?
The error "Invalid Form Key. Please refresh the page." appears when submitting the contact form.
I just don't know how to handle this. :( In my opinion, this must not even be supposed to happen. How can I get rid of this error?
The problem was the missing line inside contact page as seen in the page's source code:
My solution was to overwrite the form.php file of the contact module inside my custom theme so it could generate the line marked in the above picture.
After that I ran the command: ./magento setup:di:compile