Error when "Save for later" is clicked

Created on 17 November 2023, about 1 year ago

Steps to reproduce:

1. Add item to cart.
2. Go to cart.
3. Click on Save for later

Result: "The website encountered an unexpected error. Please try again later."
Then: No way to get into the cart.

Core/modules

Drupal 10.1.6
PHP 8.2.12
Commerce 8.x-2.36
Commerce Cart Advanced 8.x-1.0-beta4+15-dev

Logs

I got 3 Warnings and 1 Error:

1. Warning:

Warning: Undefined array key "order_items" in Drupal\views\Plugin\views\HandlerBase->getEntityType() (line 724 of /opt/drupal/web/core/modules/views/src/Plugin/views/HandlerBase.php)
#0 /opt/drupal/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real(2, 'Undefined array...', '/opt/drupal/web...', 724)
#1 /opt/drupal/web/core/modules/views/src/Plugin/views/HandlerBase.php(724): _drupal_error_handler(2, 'Undefined array...', '/opt/drupal/web...', 724)
#2 /opt/drupal/web/core/modules/views/src/Plugin/views/field/EntityField.php(232): Drupal\views\Plugin\views\HandlerBase->getEntityType()
#3 /opt/drupal/web/core/modules/views/src/ViewExecutable.php(1062): Drupal\views\Plugin\views\field\EntityField->access(Object(Drupal\Core\Session\AccountProxy))
#4 /opt/drupal/web/core/modules/views/src/ViewExecutable.php(913): Drupal\views\ViewExecutable->_initHandler('field', Array)
#5 /opt/drupal/web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(2330): Drupal\views\ViewExecutable->initHandlers()
#6 /opt/drupal/web/core/modules/views/src/ViewExecutable.php(1707): Drupal\views\Plugin\views\display\DisplayPluginBase->preExecute()
#7 /opt/drupal/web/core/modules/views/src/ViewExecutable.php(1675): Drupal\views\ViewExecutable->preExecute(Array)
#8 /opt/drupal/web/core/modules/views/src/Element/View.php(66): Drupal\views\ViewExecutable->preview('default', Array)
#9 [internal function]: Drupal\views\Element\View::preRenderViewElement(Array)
#10 /opt/drupal/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(111): call_user_func_array(Array, Array)
#11 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(797): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#12 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(386): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#13 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#14 /opt/drupal/web/core/lib/Drupal/Core/Template/TwigExtension.php(474): Drupal\Core\Render\Renderer->render(Array)
#15 /opt/drupal/web/sites/default/files/php/twig/65557482a6cdd_commerce-cart-advanced-no_7cG2If-zlE29p-xYhjH0C77Lw/KeJc16XiBKlTcgbH9UD7-136Y0EbpktZ5qjsMcH88_Q.php(51): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#16 /opt/drupal/vendor/twig/twig/src/Template.php(394): __TwigTemplate_f7be3e7a8728283b583a31489b88b86a->doDisplay(Array, Array)
#17 /opt/drupal/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#18 /opt/drupal/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#19 /opt/drupal/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render(Array, Array)
#20 /opt/drupal/web/core/themes/engines/twig/twig.engine(53): Twig\TemplateWrapper->render(Array)
#21 /opt/drupal/web/core/lib/Drupal/Core/Theme/ThemeManager.php(372): twig_render_template('modules/contrib...', Array)
#22 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(445): Drupal\Core\Theme\ThemeManager->render('commerce_cart_a...', Array)
#23 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(458): Drupal\Core\Render\Renderer->doRender(Array)
#24 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#25 /opt/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render(Array, false)
#26 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(592): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#27 /opt/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(231): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#28 /opt/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#29 /opt/drupal/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#30 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#31 /opt/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#32 /opt/drupal/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#33 /opt/drupal/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#34 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /opt/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 /opt/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#39 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#40 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#41 /opt/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#42 /opt/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#43 {main}

2. Warning

Warning: Trying to access array offset on value of type null in Drupal\views\Plugin\views\HandlerBase->getEntityType() (line 724 of /opt/drupal/web/core/modules/views/src/Plugin/views/HandlerBase.php)
#0 /opt/drupal/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real(2, 'Trying to acces...', '/opt/drupal/web...', 724)
#1 /opt/drupal/web/core/modules/views/src/Plugin/views/HandlerBase.php(724): _drupal_error_handler(2, 'Trying to acces...', '/opt/drupal/web...', 724)
#2 /opt/drupal/web/core/modules/views/src/Plugin/views/field/EntityField.php(232): Drupal\views\Plugin\views\HandlerBase->getEntityType()
#3 /opt/drupal/web/core/modules/views/src/ViewExecutable.php(1062): Drupal\views\Plugin\views\field\EntityField->access(Object(Drupal\Core\Session\AccountProxy))
#4 /opt/drupal/web/core/modules/views/src/ViewExecutable.php(913): Drupal\views\ViewExecutable->_initHandler('field', Array)
#5 /opt/drupal/web/core/modules/views/src/Plugin/views/display/DisplayPluginBase.php(2330): Drupal\views\ViewExecutable->initHandlers()
#6 /opt/drupal/web/core/modules/views/src/ViewExecutable.php(1707): Drupal\views\Plugin\views\display\DisplayPluginBase->preExecute()
#7 /opt/drupal/web/core/modules/views/src/ViewExecutable.php(1675): Drupal\views\ViewExecutable->preExecute(Array)
#8 /opt/drupal/web/core/modules/views/src/Element/View.php(66): Drupal\views\ViewExecutable->preview('default', Array)
#9 [internal function]: Drupal\views\Element\View::preRenderViewElement(Array)
#10 /opt/drupal/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(111): call_user_func_array(Array, Array)
#11 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(797): Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_ren...', 'exception', 'Drupal\\Core\\Ren...')
#12 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(386): Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array)
#13 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#14 /opt/drupal/web/core/lib/Drupal/Core/Template/TwigExtension.php(474): Drupal\Core\Render\Renderer->render(Array)
#15 /opt/drupal/web/sites/default/files/php/twig/65557482a6cdd_commerce-cart-advanced-no_7cG2If-zlE29p-xYhjH0C77Lw/KeJc16XiBKlTcgbH9UD7-136Y0EbpktZ5qjsMcH88_Q.php(51): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true)
#16 /opt/drupal/vendor/twig/twig/src/Template.php(394): __TwigTemplate_f7be3e7a8728283b583a31489b88b86a->doDisplay(Array, Array)
#17 /opt/drupal/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling(Array, Array)
#18 /opt/drupal/vendor/twig/twig/src/Template.php(379): Twig\Template->display(Array)
#19 /opt/drupal/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render(Array, Array)
#20 /opt/drupal/web/core/themes/engines/twig/twig.engine(53): Twig\TemplateWrapper->render(Array)
#21 /opt/drupal/web/core/lib/Drupal/Core/Theme/ThemeManager.php(372): twig_render_template('modules/contrib...', Array)
#22 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(445): Drupal\Core\Theme\ThemeManager->render('commerce_cart_a...', Array)
#23 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(458): Drupal\Core\Render\Renderer->doRender(Array)
#24 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender(Array, false)
#25 /opt/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render(Array, false)
#26 /opt/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(592): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#27 /opt/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(231): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#28 /opt/drupal/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#29 /opt/drupal/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch))
#30 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#31 /opt/drupal/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func(Array, Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher))
#32 /opt/drupal/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object(Symfony\Component\HttpKernel\Event\ViewEvent), 'kernel.view')
#33 /opt/drupal/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#34 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#36 /opt/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#37 /opt/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#38 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#39 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#40 /opt/drupal/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#41 /opt/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#42 /opt/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#43 {main}
.

3. Error:

InvalidArgumentException: A valid cache entry key is required. Use getAll() to get all table data. in Drupal\views\ViewsData->get() (line 140 of /opt/drupal/web/core/modules/views/src/ViewsData.php).

Thanks

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States grob82

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024