We face the issue that we sometimes get the error in the exception.log:
Exception #0 (MagentoFrameworkExceptionNoSuchEntityException): No such entity with cartId =
#0 /vendor/magento/module-quote/Model/QuoteRepository.php(149): MagentoFrameworkExceptionNoSuchEntityException::singleField('cartId', NULL)
#1 /vendor/magento/framework/Interception/Interceptor.php(58): MagentoQuoteModelQuoteRepository->getActive(NULL)
#2 /vendor/magento/framework/Interception/Interceptor.php(138): MagentoQuoteModelQuoteRepositoryInterceptor->___callParent('getActive', Array)
#3 /vendor/magento/framework/Interception/Interceptor.php(153): MagentoQuoteModelQuoteRepositoryInterceptor->MagentoFrameworkInterception{closure}(NULL)
#4 /generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php(52): MagentoQuoteModelQuoteRepositoryInterceptor->___callPlugins('getActive', Array, Array)
#5 /vendor/magento/module-quote/Model/Quote/Item/Repository.php(69): MagentoQuoteModelQuoteRepositoryInterceptor->getActive(NULL)
#6 /vendor/magento/module-checkout/Model/Cart/ImageProvider.php(56): MagentoQuoteModelQuoteItemRepository->getList(NULL)
#7 /vendor/magento/module-checkout/Model/DefaultConfigProvider.php(287): MagentoCheckoutModelCartImageProvider->getImages(NULL)
#8 /vendor/magento/framework/Interception/Interceptor.php(58): MagentoCheckoutModelDefaultConfigProvider->getConfig()
#9 /vendor/magento/framework/Interception/Interceptor.php(138): MagentoCheckoutModelDefaultConfigProviderInterceptor->___callParent('getConfig', Array)
#10 /vendor/magento/framework/Interception/Interceptor.php(153): MagentoCheckoutModelDefaultConfigProviderInterceptor->MagentoFrameworkInterception{closure}()
#11 /generated/code/Magento/Checkout/Model/DefaultConfigProvider/Interceptor.php(26): MagentoCheckoutModelDefaultConfigProviderInterceptor->___callPlugins('getConfig', Array, Array)
#12 /vendor/magento/module-checkout/Model/CompositeConfigProvider.php(38): MagentoCheckoutModelDefaultConfigProviderInterceptor->getConfig()
#13 /vendor/magento/module-checkout/Block/Cart/Shipping.php(64): MagentoCheckoutModelCompositeConfigProvider->getConfig()
#14 /vendor/magento/module-checkout/Block/Cart/Shipping.php(98): MagentoCheckoutBlockCartShipping->getCheckoutConfig()
#15 /app/design/frontend/theme/theme/Magento_Checkout/templates/cart/shipping.phtml(31): MagentoCheckoutBlockCartShipping->getSerializedCheckoutConfig()
#16 /vendor/magento/framework/View/TemplateEngine/Php.php(59): include('/...')
#17 /vendor/magento/framework/View/Element/Template.php(270): MagentoFrameworkViewTemplateEnginePhp->render(Object(MagentoCheckoutBlockCartShipping), '/...', Array)
#18 /vendor/magento/framework/View/Element/Template.php(300): MagentoFrameworkViewElementTemplate->fetchView('/...')
#19 /vendor/magento/framework/View/Element/AbstractBlock.php(667): MagentoFrameworkViewElementTemplate->_toHtml()
#20 /vendor/magento/framework/View/Layout.php(557): MagentoFrameworkViewElementAbstractBlock->toHtml()
#21 /vendor/magento/framework/View/Layout.php(533): MagentoFrameworkViewLayout->_renderBlock('checkout.cart.s...')
#22 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): MagentoFrameworkViewLayout->renderNonCachedElement('checkout.cart.s...')
#23 /vendor/magento/framework/View/Layout.php(488): MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('checkout.cart.s...')
#24 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): MagentoFrameworkViewLayout->renderElement('checkout.cart.s...', false)
#25 /vendor/magento/framework/View/Layout.php(585): MagentoFrameworkViewLayoutInterceptor->renderElement('checkout.cart.s...', false)
#26 /vendor/magento/framework/View/Layout.php(535): MagentoFrameworkViewLayout->_renderContainer('cart.summary', false)
#27 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): MagentoFrameworkViewLayout->renderNonCachedElement('cart.summary')
#28 /vendor/magento/framework/View/Layout.php(488): MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('cart.summary')
#29 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): MagentoFrameworkViewLayout->renderElement('cart.summary', false)
#30 /vendor/magento/framework/View/Layout.php(585): MagentoFrameworkViewLayoutInterceptor->renderElement('cart.summary', false)
#31 /vendor/magento/framework/View/Layout.php(535): MagentoFrameworkViewLayout->_renderContainer('content', false)
#32 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): MagentoFrameworkViewLayout->renderNonCachedElement('content')
#33 /vendor/magento/framework/View/Layout.php(488): MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('content')
#34 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): MagentoFrameworkViewLayout->renderElement('content', false)
#35 /vendor/magento/framework/View/Layout.php(585): MagentoFrameworkViewLayoutInterceptor->renderElement('content', false)
#36 /vendor/magento/framework/View/Layout.php(535): MagentoFrameworkViewLayout->_renderContainer('main', false)
#37 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): MagentoFrameworkViewLayout->renderNonCachedElement('main')
#38 /vendor/magento/framework/View/Layout.php(488): MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('main')
#39 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): MagentoFrameworkViewLayout->renderElement('main', false)
#40 /vendor/magento/framework/View/Layout.php(585): MagentoFrameworkViewLayoutInterceptor->renderElement('main', false)
#41 /vendor/magento/framework/View/Layout.php(535): MagentoFrameworkViewLayout->_renderContainer('columns', false)
#42 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): MagentoFrameworkViewLayout->renderNonCachedElement('columns')
#43 /vendor/magento/framework/View/Layout.php(488): MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('columns')
#44 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): MagentoFrameworkViewLayout->renderElement('columns', false)
#45 /vendor/magento/framework/View/Layout.php(585): MagentoFrameworkViewLayoutInterceptor->renderElement('columns', false)
#46 /vendor/magento/framework/View/Layout.php(535): MagentoFrameworkViewLayout->_renderContainer('main.content', false)
#47 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): MagentoFrameworkViewLayout->renderNonCachedElement('main.content')
#48 /vendor/magento/framework/View/Layout.php(488): MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('main.content')
#49 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): MagentoFrameworkViewLayout->renderElement('main.content', false)
#50 /vendor/magento/framework/View/Layout.php(585): MagentoFrameworkViewLayoutInterceptor->renderElement('main.content', false)
#51 /vendor/magento/framework/View/Layout.php(535): MagentoFrameworkViewLayout->_renderContainer('page.wrapper', false)
#52 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): MagentoFrameworkViewLayout->renderNonCachedElement('page.wrapper')
#53 /vendor/magento/framework/View/Layout.php(488): MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('page.wrapper')
#54 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): MagentoFrameworkViewLayout->renderElement('page.wrapper', false)
#55 /vendor/magento/framework/View/Layout.php(585): MagentoFrameworkViewLayoutInterceptor->renderElement('page.wrapper', false)
#56 /vendor/magento/framework/View/Layout.php(535): MagentoFrameworkViewLayout->_renderContainer('root', false)
#57 /generated/code/Magento/Framework/View/Layout/Interceptor.php(206): MagentoFrameworkViewLayout->renderNonCachedElement('root')
#58 /vendor/magento/framework/View/Layout.php(488): MagentoFrameworkViewLayoutInterceptor->renderNonCachedElement('root')
#59 /generated/code/Magento/Framework/View/Layout/Interceptor.php(193): MagentoFrameworkViewLayout->renderElement('root', true)
#60 /vendor/magento/framework/View/Layout.php(954): MagentoFrameworkViewLayoutInterceptor->renderElement('root')
#61 /vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkViewLayout->getOutput()
#62 /vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkViewLayoutInterceptor->___callParent('getOutput', Array)
#63 /vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkViewLayoutInterceptor->MagentoFrameworkInterception{closure}()
#64 /generated/code/Magento/Framework/View/Layout/Interceptor.php(494): MagentoFrameworkViewLayoutInterceptor->___callPlugins('getOutput', Array, Array)
#65 /vendor/magento/framework/View/Result/Page.php(257): MagentoFrameworkViewLayoutInterceptor->getOutput()
#66 /vendor/magento/framework/View/Result/Layout.php(170): MagentoFrameworkViewResultPage->render(Object(MagentoFrameworkAppResponseHttpInterceptor))
#67 /vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkViewResultLayout->renderResult(Object(MagentoFrameworkAppResponseHttpInterceptor))
#68 /vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkViewResultPageInterceptor->___callParent('renderResult', Array)
#69 /vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkViewResultPageInterceptor->MagentoFrameworkInterception{closure}(Object(MagentoFrameworkAppResponseHttpInterceptor))
#70 /generated/code/Magento/Framework/View/Result/Page/Interceptor.php(130): MagentoFrameworkViewResultPageInterceptor->___callPlugins('renderResult', Array, Array)
#71 /vendor/magento/framework/App/Http.php(139): MagentoFrameworkViewResultPageInterceptor->renderResult(Object(MagentoFrameworkAppResponseHttpInterceptor))
#72 /generated/code/Magento/Framework/App/Http/Interceptor.php(24): MagentoFrameworkAppHttp->launch()
#73 /vendor/magento/framework/App/Bootstrap.php(257): MagentoFrameworkAppHttpInterceptor->launch()
#74 /index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttpInterceptor))
#75 {main}
Actually we are overriding checkout_cart_index.xml that can cause this issue. Because of try to moving cart.summary
after checkout.cart.form
. See: https://magento.stackexchange.com/a/265089/16894
Our current checkout_cart_index.xml
looks like this, but we can not find the issue or solve it. What are we missing?
And will this solve the issue or is this issue caused by something else?
checkout_cart_index.xml
<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<update handle="checkout_cart_item_renderers"/>
<head>
<css src="Magento_Theme::css/checkout.css" media="screen and (min-width: 1px)"/>
</head>
<body>
<referenceContainer name="content">
<container name="cart.items" htmlTag="div" htmlClass="row cart-items" before="-">
<container name="cart.item.block" htmlTag="div" htmlClass="col-lg-8 items-cart" before="-">
</container>
<container name="cart.totals.block" htmlTag="div" htmlClass="col-lg-4 totals-cart" after="cart.item.block">
<block class="MagentoCheckoutBlockCart" name="cart.totals.title" before="-" template="Magento_Checkout::cart/text.phtml"/>
</container>
</container>
</referenceContainer>
<move element="page.main.title" destination="cart.item.block" before="-"/>
<move element="checkout.cart.form" destination="cart.item.block" before="checkout.cart.form"/>
<move element="checkout.cart.coupon" destination="cart.item.block" before="checkout.cart.coupon"/>
<move element="checkout.cart.order.actions" destination="cart.item.block" after="-"/>
<move element="checkout.cart.crosssell" destination="cart.items" after="-"/>
<referenceBlock name="checkout.cart.coupon" remove="true"/>
<referenceBlock name="checkout.cart.crosssell" remove="true"/>
<referenceBlock name="checkout.cart.totals.title" remove="true"/>
<referenceBlock name="checkout.cart.summary.title" remove="true"/>
<move element="checkout.cart.container" destination="cart.totals.block" after="checkout.cart.totals.title"/>
</body>
</page>