Changing log version mismatch setting has no effect

Created on 25 October 2023, about 1 year ago
Updated 17 November 2023, about 1 year ago

Describe your bug or feature request.

Changing the value of log_version_mismatch setting in commerce_order entity type has no effect on OrderLockedSaveException.

When https://www.drupal.org/project/commerce/issues/3043180 🐛 The changes made to the order on the onNotify method are not applied on the onReturn method Fixed was resolved, the existing log_version_mismatch was used to decide if the exception should be thrown or only logged.
see https://www.drupal.org/project/commerce/issues/3043180#comment-14994046 🐛 The changes made to the order on the onNotify method are not applied on the onReturn method Fixed .

The approach is correct, however, in doOrderPreSave() inside the OrderStorage, the installed entity type definition is being used to determine the value instead of the current active definition, this is because of the following line:
$log_only = $this->getEntityType()->get('log_version_mismatch');
The above line will get the value from the installed definition, while the following line will get the active value.
$log_only = $order->getEntityType()->get('log_version_mismatch');

🐛 Bug report
Status

Fixed

Version

2.0

Component

Order

Created by

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

Comments & Activities

Production build 0.71.5 2024