I added Form key in all forms. But in some forms still, I am getting Invalid form key Please refresh error often. How to solve this? Is I need to add further things to solve this? Kindly help me.
could you please share the code on which you getting this issue– ASQSep 17, 2019 at 12:50
The problem is that I got Cannot read property 'sectionLoadUrl' of undefined in that form. That displayed Invalid form key Please refresh error often.
I fixed it by adding the following code to layout.xml
<referenceContainer name="content"> <block name="customer.section.config" class="Magento\Customer\Block\SectionConfig" template="Magento_Customer::js/section-config.phtml"/> <block name="customer.customer.data" class="Magento\Customer\Block\CustomerData" template="Magento_Customer::js/customer-data.phtml"/> </referenceContainer>