۶Ƶ

[PaaS only]{class="badge informative" title="Applies to ۶Ƶ Commerce on Cloud projects (۶Ƶ-managed PaaS infrastructure) and on-premises projects only."}

ACSD-67347: Order fails with Cannot acquire a lock error when using coupon codes

The ACSD-67347 patch fixes the issue where orders fail with a Cannot acquire a lock error when coupon codes contain special characters (for example, BIT/123456) and file locking is enabled. This patch is available when the Quality Patches Tool (QPT) 1.1.69 is installed. The patch ID is ACSD-67347. Please note that this issue is scheduled to be fixed in ۶Ƶ Commerce 2.4.9.

Affected products and versions

The patch is created for ۶Ƶ Commerce version:

  • ۶Ƶ Commerce (all deployment methods) 2.4.5-p12

Compatible with ۶Ƶ Commerce versions:

  • ۶Ƶ Commerce (all deployment methods) 2.4.5-p11 - 2.4.5-p13
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your ۶Ƶ Commerce version, update the magento/quality-patches package to the latest version and check the compatibility on the Quality Patches Tool: Search for patches page. Use the patch ID as a search keyword to locate the patch.

Issue

Orders fail with the Cannot acquire a lock error when coupons with special characters are used and file locking is enabled.

Steps to reproduce:

  1. Install 2.4-develop.

  2. Set the file lock configuration in the env.php file:

    code language-none
    'lock' => [
            'provider' => 'file',
            'config' => [
                'path' => '/Users/awijesooriya/sites/acsd15194dev/locks'
            ]
        ],
    
  3. Create a cart rule with a coupon using the coupon code format: BIT/123456.

  4. Create a simple product.

  5. Add the product to the cart and apply the coupon code.

  6. Proceed to checkout and place the order.

Expected results:

Orders are placed successfully because there are no restrictions on creating coupon codes.

Actual results:

The order cannot be placed. The following error appears: Cannot acquire lock.

File "/Users/test/sites/test/locks/coupon_code_123/abc" cannot be opened Warning!fopen(/Users/test/sites/test/locks/coupon_code_123/abc): Failed to open stream: No such file or directory

Apply the patch

To apply individual patches, use the following links depending on your deployment method:

To learn more about Quality Patches Tool, refer to:

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3