I’m using a custom template and having an issue with the minicart rendering.
The minicart pop-up renders, but does not gather any data with 2 errors in the console.
So the popup does open when you click on it, but due to the errors above, only part of the contents are being loaded:
More info about the environment:
-
Custom theme does not overwrite any Catalog or checkout templates
-
The theme is based upon Luma theme and the minicart does work as expected when activating the Luma theme.
-
Tried resetting cache, compiling and regenerating multiple times
-
I’ve also tried copying the template files from the base folders to my theme, but the same issue remains
-
The minicart template in the layout file is a straight up copy from the base magento files
<block class="MagentoCheckoutBlockCartSidebar" name="minicart" as="minicart" after="logo" template="Magento_Checkout::cart/minicart.phtml"> <arguments> <argument name="jsLayout" xsi:type="array"> <item name="types" xsi:type="array"/> <item name="components" xsi:type="array"> <item name="minicart_content" xsi:type="array"> <item name="component" xsi:type="string">Magento_Checkout/js/view/minicart</item> <item name="config" xsi:type="array"> <item name="template" xsi:type="string">Magento_Checkout/minicart/content</item> </item> <item name="children" xsi:type="array"> <item name="subtotal.container" xsi:type="array"> <item name="component" xsi:type="string">uiComponent</item> <item name="config" xsi:type="array"> <item name="displayArea" xsi:type="string">subtotalContainer</item> </item> <item name="children" xsi:type="array"> <item name="subtotal" xsi:type="array"> <item name="component" xsi:type="string">uiComponent</item> <item name="config" xsi:type="array"> <item name="template" xsi:type="string">Magento_Checkout/minicart/subtotal</item> </item> </item> </item> </item> <item name="extra_info" xsi:type="array"> <item name="component" xsi:type="string">uiComponent</item> <item name="config" xsi:type="array"> <item name="displayArea" xsi:type="string">extraInfo</item> </item> </item> <item name="promotion" xsi:type="array"> <item name="component" xsi:type="string">uiComponent</item> <item name="config" xsi:type="array"> <item name="displayArea" xsi:type="string">promotion</item> </item> </item> </item> </item> </item> </argument> </arguments> <container name="minicart.addons" label="Mini-cart promotion block"/> </block>`
Could it be that I am missing or filtering out any Javascript loading in the custom theme?
The theme I’m using is built upon Magento2-sass-tailwind-theme with mostly upgrades to styles.
If anyone could point me in the right direction, I would be most grateful.