Magento 2 “Invalid Form Key. Please refresh the page”

在Magento2 后台登录或者,当您在Magento 2中创建具有多个属性的产品时,可能会收到错误消息“无效的表单密钥。 请刷新页面。”

要消除此消息,您需要增加php.ini文件中max_input_vars的值。 默认情况下,此值设置为1000。您应该将其设置为5000或10000。
为此,请按照下列步骤操作:
找到php.ini文件的配置,查看max_input_vars变量的值,编辑max_input_vars的值为5000或者10000.然后保存,重启服务器。
本文参考:https://magentip.com/solved-magento-2-invalid-form-key-please-refresh-the-page/