It was working fine until last week... but after I updated my footer styles this issue occurs. I reverted my footer changes but the issue is still present. This is happening if I'm using my custom theme. When I change to default Luma theme JS error is not showing.


I'm was getting the same error too, with Magento version - 2.1.5, PHP - 7.0.6,
I had previously removed "content" container from customer module,
I fixed it by adding 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>
@anjanaVoilaah thank you for your feedback.
Please provide exact steps in format:
Steps
@anjanaVoilaah thank you for your report. Unfortunately, we can not fix the issue in the core if we can not reproduce it. We are closing the issue for now. If you'd like to update it, please reopen the issue.
I am getting the error in console like this only on categoty page.
Uncaught TypeError: Cannot read property 'sectionLoadUrl' of undefined
I searched in Google for this and fixed the issue, it's created becuase of i have remove magento default main container and create new container so it's created , simple i past bellow code into my container and clear cache and issue was fixed.
<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"/>
Hope you understant my cenario and code.
Most helpful comment
I'm was getting the same error too, with Magento version - 2.1.5, PHP - 7.0.6,
I had previously removed "content" container from customer module,
I fixed it by adding following code to layout.xml