On cart page I am getting this error in console:
Failed to load the "Magento_GiftMessage/js/view/gift-message" component
When I disable the module Magento_GiftMessage is working but it effect some where.
cartgiftmessagemagento2magento2.3.2
On cart page I am getting this error in console:
Failed to load the "Magento_GiftMessage/js/view/gift-message" component
When I disable the module Magento_GiftMessage is working but it effect some where.
if that's still relevant, here's the answer:
Magento_SalesRule/js/view/payment/discount
requires Magento_Checkout/js/model/quote
, which asks for window.checkoutConfig.quoteData
on line 32:
quoteData = window.checkoutConfig.quoteData,
window.checkoutConfig
is not available anywhere except the checkout page - it is set in module-checkout/.../templates/onepage.phtml
on line 26:
window.checkoutConfig = <?= /* @escapeNotVerified */ $block->getSerializedCheckoutConfig() ?>;
So, you are getting a TypeError: Cannot read property 'quoteData' of undefined
.
After that, url-builder
produces the same kind of error when trying to read window.checkoutConfig.storeCode
.
You can see it if you set a breakpoint in require.js
on line 883, where it handles such errors. Look at the stack trace printed in the console and click on the function call right before onError
(it says check
).
I have faced same issue on cart and checkout page, In console it shows me "Failed to load the component" error. I have research more about this and check with disable all third party modules and theme but no luck.
So, I have checked with comment out app/etc/env.php to env_bck.php file and run URL from browser address bar. I have check "Readiness Check" and found some PHP extension is missing.
I hvae installed missing PHP extension and checked site it is working fine.
This solution might be help.
Thanks.
Best Answer
I had checkout_cart_index.xml copied to my theme folder and which was causing the issue, upon removing the file from theme folder it removed the error. Just copy the components from vendor to theme checkout_cart_index.xml which require changes.