I am making a product page that has a product with multiple options for height and width in a dropdown. When I more than about 40 options, the page wont save them anymore. The page will just say

Invalid Form Key. Please refresh the page.

I tried refreshing the page, clearing the browser cookies and cache, clearing magento cache and clearing values in web/cookie/cookie_domain and web/cookie/cookie_path in the core_config_data table. I've tried different browsers in incongnito mode and they all seem to fail once I try to add to many values. Here is my webpage with some of the values. https://buyglass.woodstove-fireplaceglass.com/pyroceramic-glass.html Has anyone had this happen to them before, or have any other ideas on how to fix this?

  • 1
    Have you checked max input vars magento.stackexchange.com/a/231208/70343 Commented Aug 9, 2019 at 17:41
  • I just tried adding php_value max_input_vars 6000 to the bottom of .htaccess and it caused my site to crash
    – Josiah
    Commented Aug 9, 2019 at 17:55
  • Okay so I added that code under <IfModule mod_php7.c> in the htaccess and there are no errors, but it does not look like the value changed in my phpinfo page
    – Josiah
    Commented Aug 9, 2019 at 18:01
  • I added the rule max_input_vars = 6000 into the user.ini file and it worked! No more erros, thank you so much! If you add it as an answer I will choose it as correct
    – Josiah
    Commented Aug 9, 2019 at 18:10

1 Answer 1


Have you checked max input vars


I think what was happening was the submission wasn't catching all of the fields in the form submission. One of which was the form key.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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