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
    Commented Sep 17, 2019 at 12:50

1 Answer 1


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"
        <block name="customer.customer.data"

Your Answer

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

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