Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top