Exception\OrderVersionMismatchException

Created on 28 November 2023, about 1 year ago

Describe your bug or feature request.

Drupal\commerce_order\Exception\OrderVersionMismatchException: Attempted to save order 4026 with version 80. Current version is 81. in public_html/modules/contrib/commerce/modules/order/src/Entity/Order.php:681

Stack trace:
#0 public_html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(528): Drupal\commerce_order\Entity\Order->preSave()
#1 public_html/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(753): Drupal\Core\Entity\EntityStorageBase->doPreSave()
#2 public_html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(483): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave()
#3 public_html/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(806): Drupal\Core\Entity\EntityStorageBase->save()
#4 public_html/modules/contrib/commerce/modules/order/src/OrderStorage.php(161): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()
#5 public_html/core/lib/Drupal/Core/Entity/EntityBase.php(339): Drupal\commerce_order\OrderStorage->save()
#6 public_html/modules/contrib/commerce/modules/order/src/OrderStorage.php(148): Drupal\Core\Entity\EntityBase->save()
#7 public_html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(319): Drupal\commerce_order\OrderStorage->postLoad()
#8 public_html/core/lib/Drupal/Core/Entity/EntityStorageBase.php(607): Drupal\Core\Entity\EntityStorageBase->loadMultiple()
#9 public_html/modules/custom/rhythm_shortcodes/src/Plugin/Shortcode/MenuShortcode.php(37): Drupal\Core\Entity\EntityStorageBase->loadByProperties()
#10 public_html/modules/custom/rhythm_shortcodes/src/Plugin/Shortcode/MenuShortcode.php(155): Drupal\rhythm_shortcodes\Plugin\Shortcode\get_cart_item_count()
#11 public_html/modules/contrib/shortcode/src/ShortcodeService.php(438): Drupal\rhythm_shortcodes\Plugin\Shortcode\MenuShortcode->process()
#12 public_html/modules/contrib/shortcode/src/ShortcodeService.php(315): Drupal\shortcode\ShortcodeService->processTag()
#13 public_html/modules/contrib/shortcode/src/Plugin/Filter/Shortcode.php(78): Drupal\shortcode\ShortcodeService->process()
#14 public_html/core/modules/filter/src/Element/ProcessedText.php(118): Drupal\shortcode\Plugin\Filter\Shortcode->process()
#15 [internal function]: Drupal\filter\Element\ProcessedText::preRenderText()
#16 public_html/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(111): call_user_func_array()
#17 public_html/core/lib/Drupal/Core/Render/Renderer.php(797): Drupal\Core\Render\Renderer->doTrustedCallback()
#18 public_html/core/lib/Drupal/Core/Render/Renderer.php(386): Drupal\Core\Render\Renderer->doCallback()
#19 public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#20 public_html/core/lib/Drupal/Core/Template/TwigExtension.php(474): Drupal\Core\Render\Renderer->render()
#21 public_html/sites/default/files/php/twig/6564e4bbdc3a2_field.html.twig_jbb1EEfdY116UPNa7YD7Jj10p/xOR8OLApITJtAqyR6730YNPVbLnTeCo9GwQTzRIcLiI.php(84): Drupal\Core\Template\TwigExtension->escapeFilter()
#22 public_html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_c7fb83c94c0b3304c96921acddaada96->doDisplay()
#23 public_html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling()
#24 public_html/vendor/twig/twig/src/Template.php(379): Twig\Template->display()
#25 public_html/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render()
#26 public_html/core/themes/engines/twig/twig.engine(53): Twig\TemplateWrapper->render()
#27 public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(372): twig_render_template()
#28 public_html/core/lib/Drupal/Core/Render/Renderer.php(445): Drupal\Core\Theme\ThemeManager->render()
#29 public_html/core/lib/Drupal/Core/Render/Renderer.php(458): Drupal\Core\Render\Renderer->doRender()
#30 public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#31 public_html/core/lib/Drupal/Core/Template/TwigExtension.php(474): Drupal\Core\Render\Renderer->render()
#32 public_html/sites/default/files/php/twig/6564e4bbdc3a2_block.html.twig_TffPRWK0hLJg6-UYH6Wyvnz68/7Kp85E5yZ65A8XZZ3nc5s5i2IT327HSg3tw9Kx_q9VE.php(86): Drupal\Core\Template\TwigExtension->escapeFilter()
#33 public_html/vendor/twig/twig/src/Template.php(171): __TwigTemplate_abd2e4d5b0bfc061cec60c00ac18c9f0->block_content()
#34 public_html/sites/default/files/php/twig/6564e4bbdc3a2_block.html.twig_TffPRWK0hLJg6-UYH6Wyvnz68/7Kp85E5yZ65A8XZZ3nc5s5i2IT327HSg3tw9Kx_q9VE.php(70): Twig\Template->displayBlock()
#35 public_html/vendor/twig/twig/src/Template.php(394): __TwigTemplate_abd2e4d5b0bfc061cec60c00ac18c9f0->doDisplay()
#36 public_html/vendor/twig/twig/src/Template.php(367): Twig\Template->displayWithErrorHandling()
#37 public_html/vendor/twig/twig/src/Template.php(379): Twig\Template->display()
#38 public_html/vendor/twig/twig/src/TemplateWrapper.php(40): Twig\Template->render()
#39 public_html/core/themes/engines/twig/twig.engine(53): Twig\TemplateWrapper->render()
#40 public_html/core/lib/Drupal/Core/Theme/ThemeManager.php(372): twig_render_template()
#41 public_html/core/lib/Drupal/Core/Render/Renderer.php(445): Drupal\Core\Theme\ThemeManager->render()
#42 public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#43 public_html/core/lib/Drupal/Core/Render/Renderer.php(160): Drupal\Core\Render\Renderer->render()
#44 public_html/core/lib/Drupal/Core/Render/Renderer.php(592): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#45 public_html/core/lib/Drupal/Core/Render/Renderer.php(161): Drupal\Core\Render\Renderer->executeInRenderContext()
#46 public_html/core/lib/Drupal/Core/Render/Renderer.php(175): Drupal\Core\Render\Renderer->renderPlain()
#47 public_html/core/lib/Drupal/Core/Render/Renderer.php(674): Drupal\Core\Render\Renderer->renderPlaceholder()
#48 public_html/core/lib/Drupal/Core/Render/Renderer.php(562): Drupal\Core\Render\Renderer->replacePlaceholders()
#49 public_html/core/lib/Drupal/Core/Render/Renderer.php(204): Drupal\Core\Render\Renderer->doRender()
#50 public_html/core/lib/Drupal/Core/Render/Renderer.php(148): Drupal\Core\Render\Renderer->render()
#51 public_html/core/lib/Drupal/Core/Render/Renderer.php(592): Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}()
#52 public_html/core/lib/Drupal/Core/Render/Renderer.php(149): Drupal\Core\Render\Renderer->executeInRenderContext()
#53 public_html/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php(285): Drupal\Core\Render\Renderer->renderRoot()
#54 public_html/core/lib/Drupal/Core/Render/HtmlResponseAttachmentsProcessor.php(134): Drupal\Core\Render\HtmlResponseAttachmentsProcessor->renderPlaceholders()
#55 public_html/core/lib/Drupal/Core/EventSubscriber/HtmlResponseSubscriber.php(45): Drupal\Core\Render\HtmlResponseAttachmentsProcessor->processAttachments()
#56 [internal function]: Drupal\Core\EventSubscriber\HtmlResponseSubscriber->onRespond()
#57 public_html/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#58 public_html/vendor/symfony/http-kernel/HttpKernel.php(214): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#59 public_html/vendor/symfony/http-kernel/HttpKernel.php(202): Symfony\Component\HttpKernel\HttpKernel->filterResponse()
#60 public_html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#61 public_html/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#62 public_html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#63 public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(191): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#64 public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(128): Drupal\page_cache\StackMiddleware\PageCache->fetch()
#65 public_html/core/modules/page_cache/src/StackMiddleware/PageCache.php(82): Drupal\page_cache\StackMiddleware\PageCache->lookup()
#66 public_html/modules/contrib/advban/src/AdvbanMiddleware.php(57): Drupal\page_cache\StackMiddleware\PageCache->handle()
#67 public_html/core/modules/ban/src/BanMiddleware.php(50): Drupal\advban\AdvbanMiddleware->handle()
#68 public_html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#69 public_html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#70 public_html/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#71 public_html/core/lib/Drupal/Core/DrupalKernel.php(704): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#72 public_html/index.php(19): Drupal\Core\DrupalKernel->handle()
#73 {main}

If a bug, provide steps to reproduce it from a clean install.

Not sure how to repoduce this.
The events are occuring randomly and triggered by anonymous/guest users only.

🐛 Bug report
Status

Closed: won't fix

Version

2.36

Component

Commerce

Created by

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

Comments & Activities

  • Issue created by @99gs3
  • Status changed to Closed: won't fix about 1 year ago
  • 🇮🇱Israel jsacksick

    As you can see you have contrib/custom code in the stacktrace:

    public_html/modules/custom/rhythm_shortcodes/src/Plugin/Shortcode/MenuShortcode.php(37): Drupal\Core\Entity\EntityStorageBase->loadByProperties()
    #10 public_html/modules/custom/rhythm_shortcodes/src/Plugin/Shortcode/MenuShortcode.php(155): Drupal\rhythm_shortcodes\Plugin\Shortcode\get_cart_item_count()

    So not really a Commerce core issue.

Production build 0.71.5 2024