Last days I have this strange issue in my Magento instance. When you are in front end catalog category page and press store view link, Magento changes to the right store view but you get message

Invalid form key. Please refresh page

This is happening to all catalog pages only. Not on homepage or cms pages.

I have no error in console or logs and I have increased max_inputs_vars in php to 200000

Also I don’t use Magento cookie path and I have set cookie lifetime to 14400

After further check this issue is not in dev server which I don't use Varnish and Redis. I am suspecting these....

Any help please?

  • Did you check the network tab? Is a form key transmitted on the request? And if it is, did you check the $_REQUEST array if it is still there?
    – Alex
    Jan 25, 2020 at 20:07
  • @Alex no form is transmitted on the request. That’s the strange. This page is a static block for a category. And that’s why I don’t know what is going on
    – G. G.
    Jan 25, 2020 at 20:38

1 Answer 1


Finally we managed to solve this. Here is the solution for anybody has this issue. The specific category catalog page we had this issue was only with static block. No products was rendering there because of our design.

So to achieve this except from removing layered from sidebar we had this on update layout xml:

<referenceContainer name="columns" remove="true" />

I don't know why but this was giving invalid form key in frontend when you changed store view

We removed that and issue disappeared

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .