3

I am using php 7.2.13 version and magento 2.3 latest version in xampp. When i do add to wishlist and save anything am getting Invalid Form Key. Please refresh the page? this error.

2
  1. Change your Baseurl and Baseurl secure to 127.0.0.1 instead of localhost

    run cache:flush

  2. Or delete all directories below var/cache

0

Life saver. This worked for me. It also solved my other problem of getting a blank admin panel page. I am testing a fresh install of Magento 2.1.3 on WAMP.

Other fixes I needed to make it work on WAMP:

\wamp64\www\\vendor\magento\framework\View\Element\Template\File\Validator.php

Changes at line 138:

    //$realPath = $this->fileDriver->getRealPath($path);
    $realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
  • ROOT > var > cache > DELETE ALL
  • ROOT > var > page_cache > DELETE ALL
  • ROOT > var > session > DELETE ALL

\wamp64\www\\app\etc\di.xml

Replace:

<item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink</item> 

With:

<item name="view_preprocessed" xsi:type="object">Magento\Framework\App\View\Asset\MaterializationStrategy\Copy</item>

So many answers difficult to get answers that work for you. WAMP related answers were difficult to find for 2.3.1.

Besides, it is so hard to get Magento 2.x versions to work straight away. Still struggling to make it work on Ubuntu 18.04.

  • Try using docker instead of wamp – Dominic Xigen May 20 at 23:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.