Invalid Form Key. Please Refresh The Page. — Error

Milople Technologies
2 min readNov 29, 2020

This is one of the most common problems Magento developers face. In particular, you cannot log in to the Magento administrator. At the same time, the following message is displayed: “Invalid form key. please refresh the page.”. Here is the solution.

⇒ Some reasons for an invalid form key. please refresh the page. Errors in Magento:

◊ When a developer uses multiple attributes to create products, the invalid form key reaches the page.

◊ Sometimes the error occurs in the custom module “Invalid form key. Refresh page”. Flashes on the screen.

◊ Your code will redirect the user to another page. The redirect is having difficulty and a form key error occurs.

◊ Cookies are also the reason for the invalid key.

◊ Magento server settings also play an important role in the “Invalid form key, please refresh page” error.

⇒ Fixed “Invalid form key. Please refresh the page.” Problem:
◊ The problem of multiple attributes in the same product in Magento 2:
»Perform the following steps to configure mass product attributes Magento 2:

∝ The first necessary step is to log in to Admin.

∝ Then select Catalog → Products.

invalid form key. please refresh the page. — Multiple attributes in Magento catalog

∝ Select Products to change the attributes.

invalid form key. please refresh the page. — Select products to change attributes

∝ As shown in the image, after selecting the products, click the drop-down menu and select the Update Attributes option.

Select the Update Attributes option

∝ After selecting the Update attributes option, activate the check box, and update the attributes.

Solution for invalid form key. refresh the page. — Update attribute

◊ Problem with custom modules:
Custom module problems must first be patched to fix the problem. After the correction, refresh the page.

◊ Forwarding to another page:
When redirecting the user to another page, make sure the provided link / URL of the page is mentioned. Please check and refresh the page to resolve the form key problem.

◊ Cookie problem:
»The deletion or deletion of cookies and the browser cache must also be deleted. As a result, you may not be able to see the “Invalid form key, please refresh the page” error.

»DELETE FROM core_config_data WHERE path = ‘web / cookie / cookie_domain’

◊ Magento server configuration:
»Increase the hosting provider from 70,000 to 10,000: php_value max_input_vars 100000

»If app / code / local / Mage / Core / Model / Session.php is there, delete it.

»Open the directory var/cache and clean it up.

--

--

Milople Technologies
0 Followers

We are a young technology company that has taken the ecommerce industry by storm. We research, develop and build products