Check empty ID before releasing lock in Order Storage

Created on 27 September 2024, about 2 months ago

The fix from https://www.drupal.org/project/commerce/issues/3468783 📌 Order Storage Lock Release Fixed triggers a fatal error if the order doesn't save properly and doesn't receive an ID beforehand. For example I got it while having faulty code in a presave subscriber.

Previously we were checking isset($this->updateLocks[$entity->id()]) so maybe let's add back a !empty($entity->id())? Not sure if the lock would still persist is some other edge cases.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Order

Created by

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

Comments & Activities

  • Issue created by @ts.ag
  • First commit to issue fork.
Production build 0.71.5 2024