Describe your bug or feature request.

I am getting this issue on commerce 2.36

Drupal\commerce_order\Exception\OrderVersionMismatchException: Attempted to save order 56 with version 6. Current version is 7. in Drupal\commerce_order\Entity\Order->preSave() (line 681 of /app/web/modules/contrib/commerce/modules/order/src/Entity/Order.php).

Some additional context here: https://www.drupal.org/project/commerce/issues/3227507#comment-15331754

Apply this patch and turn on exceptions for review: https://www.drupal.org/project/commerce/issues/3404282
Change the setting from admin/commerce/config/orders/settings to "Prevent the save and throw an exception that may cause a fatal error.."

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

Comments

nicxvan created an issue. See original summary.

jsacksick’s picture

Status: Active » Postponed (maintainer needs more info)

@nicxvan: I think you misunderstood my instructions...

Switch back to "logging" the exception after applying the patch from #3404282: Improve the order version exception logging so you could see what's triggering this...
This could be due to contrib/custom code... And it's possible that this isn't an easy fix. With a random bug report like this, there's nothing I can really do :).

jsacksick’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)