0

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.

1
  • could you please share the code on which you getting this issue
    – ASQ
    Sep 17, 2019 at 12:50

1 Answer 1

0

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>

Your Answer

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

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