Hi,
We are facing an issue after upgrading Magento version to 2.3.5.
Invalid form key. Please refresh the page. is showing on every page only on safari browser.
Hi @mandar_parbate1
If this issue is only coming on Safari browser try clearing all the cache on the browser and check again.
Also can you confirm from which version of magento 2 you have done upgrade to magento 2.3.5?
im using 2.3.5-p1. facing same error.
Hi
Facing the same issue here.
Invalid Form Key. Please refresh the page.
Magento ver. 2.3.5-p1
Safari only.
I've changed to developer mode.
Cleaned all directories with
CSP is not setup correctly. Either fix csp or disable it:
php bin/magento module:disable Magento_Csp
I try to disable this module using your command.
It says:
-bash: magento: command not found
In my case, this was caused by a typo in a template file.
In my theme's template, Magento_Review/templates/review.phtml:
<script type="text/x-magento-init"> { "*": { "Magento_Review/js/process-reviews": { "productReviewUrl": <?= $block->escapeJs($block->getProductReviewUrl()) ?>", "reviewsTabSelector": "#tab-label-reviews" } } } </script>
There's a missing double quote, and it should look like this:
<script type="text/x-magento-init"> { "*": { "Magento_Review/js/process-reviews": { "productReviewUrl": "<?= $block->escapeJs($block->getProductReviewUrl()) ?>", "reviewsTabSelector": "#tab-label-reviews" } } } </script>
After adding that double quote, the JS for Add to Cart populates with the correct Form Key, and all is good.