cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid form key. Magento 2

SOLVED

Invalid form key. Magento 2

When we add a configurable product and assign more then ten attributes from a attribute set for example colour and size, we then hit save it returns "Invalid form key. Please refresh the page". Is this a bug within Magento or a set up issue on our end... Any ideas?

7 REPLIES

Re: Invalid form key. Magento 2

Please ask hosting provider to increase php_value max_input_vars 75000.

  1. Remove app/code/local/Mage/Core/Model/Session.php is exist.
  2. Try to clear the cache from var/cache directory.
  3. Then clear browser cache. Especially clear or delete cookies.

 

Hope this helps you!

 

Regards

Manish

OpenSource Expert | OpenSource Technologies | www.opensourcetechnologies.com
Magento plugins released: http://www.opensourcetechnologies.com/product/product-category/magento-extensions

Re: Invalid form key. Magento 2

Hi Guys,

 

Thank you for the comment as I increased the max_input_vars as you suggested and It resolved the problem. Again many thanks for the assistance with this.

 

Kind Reggards

Jez

Re: Invalid form key. Magento 2

This solution doesn't work

Re: Invalid form key. Magento 2

Open your server's php.ini file with root user, search for `max_input_vars` and set its value as `100000` and it will solve your problem.

max_input_vars = 100000

 

Re: Invalid form key. Magento 2

Sorry, but this could not be a solution. This looks more like an workaround. Increasing the size of the parameter if this error occured results in a very unsecure (DOS) server configuration. It looks more like a misconception in the implementation or an bug.

Re: Invalid form key. Magento 2

100000???? The default is 1000. So you're saying magento needs 100x more than the vast majority of other php programs in existence?!?!

 

Re: Invalid form key. Magento 2

In root directory php.ini

add line

-----------------------------------------------
max_input_vars=10000

-----------------------------------------------

This is will solve your issue.