I am seeing the following error in the console on every page of our site (Magento 2.1.4)...

Failed to load resource: the server responded with a status of 400 () - customer/section/load/?sections=review&update_section_id=false&_=1507203330016
Uncaught Error: [object Object]
at Object.<anonymous> (customer-data.js:86)
at fire (jquery.js:3099)
at Object.fireWith [as rejectWith] (jquery.js:3211)
at done (jquery.js:9312)
at XMLHttpRequest.callback (jquery.js:9720)

It only seems to appear when I merge the JS in admin. If JS is not merged then the error does not appear.

Does anyone know what this is related to (other than the merge of JS)?

I checked this answer: TypeError: options is undefined (customer-data.js) but I have not extended Magento_Customer module so I dont think it is related.

Thanks for any help


Slightly more in-depth explanation...

Magento\Customer\Controller\Section\Load returns a 400 status code when the requested section is not found within Magento\Customer\CustomerData\SectionPoolInterface::sectionSourceMap

Source maps are added by their respective modules' using dependency injection in module/etc/frontend/di.xml. The review section is added here: https://github.com/magento/magento2/blob/9db4501d29028ba9ac552f14d80b42bc923847f4/app/code/Magento/Review/etc/frontend/di.xml#L32

I've found this information helpful when troubleshooting other customer section request errors.


Although TypeError: options is undefined (customer-data.js) was not the answer it did help me to debug - turns out my reviews module was disabled - re-enabling solved it

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.