ACSD-48417: SQL error after creating a schedule change

The ACSD-48417 patch fixes the issue where an SQL error appears after creating a schedule change for a product and saving another product. This patch is available when the Quality Patches Tool (QPT) 1.1.26 is installed. The patch ID is ACSD-48417. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.7.

Affected products and versions

The patch is created for Adobe Commerce version:

  • Adobe Commerce (all deployment methods) 2.4.1-p1

Compatible with Adobe Commerce versions:

  • Adobe Commerce (all deployment methods) 2.4.5 - 2.4.6
NOTE
The patch might become applicable to other versions with new Quality Patches Tool releases. To check if the patch is compatible with your Adobe 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

An SQL error appears after creating a schedule change for a product and saving another product.

Steps to reproduce:

  1. Install Magento 2.4-develop EE + Sample Data.

  2. Go to the admin panel > Catalog > Products.

  3. Edit any product (e.g., Joust Duffle Bag [SKU: 24-MB01]).

  4. Schedule a new update:

    • Select Save as a New Update
    • Update name: “Update 1”
    • Start Date: current time +1 min
    • End Date: current time +1 hour
    • Modify Product name to: “Joust Duffle Bag 2”
    • Save the product.
  5. Go to CLI and execute cron and wait till the schedule is applied.

    code language-none
    bin/magento cron:run && bin/magento cron:run
    
  6. Again, go to Catalog > Products and edit any configurable product (e.g., Chaz Kangeroo Hoodie [SKU: MH01]).

    • Disable all variants. Go to the Actions column > Select > Disable Product.
    • Save the configurable one.

Expected results:

No error upon saving the product.

Actual results:

The following error occurs:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'sku' cannot be null, query was: INSERT INTO `catalog_product_entity` (`entity_id`, `sku`, `row_id`, `created_in`, `updated_in`) VALUES (?, ?, ?, ?, ?)

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:

For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.

recommendation-more-help
8bd06ef0-b3d5-4137-b74e-d7b00485808a