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.

  • could you please share the code on which you getting this issue – ASQ Sep 17 at 12:50
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, privacy policy and cookie policy

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