0

This getting this error on a particular form in Magento 2.3.0. I think this error causes invalid form key sometimes when submitting the form. How to solve this following error.

Uncaught TypeError: Cannot read property 'sectionLoadUrl' of undefined
    at Object.getFromServer (customer-data.js:90)
    at Object.reload (customer-data.js:333)
    at UiClass.initialize (minicart.js:105)
    at UiClass.initialize (wrapper.js:109)
    at new UiClass (class.js:49)
    at Object.initComponent (layout.js:137)
    at fire (jquery.js:3232)
    at Object.fireWith [as resolveWith] (jquery.js:3362)
    at Object.deferred.<computed> (jquery.js:3461)
    at fire (jquery.js:3232)

1 Answer 1

0

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.