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
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:
-
Install Magento 2.4-develop EE + Sample Data.
-
Go to the admin panel > Catalog > Products.
-
Edit any product (e.g., Joust Duffle Bag [SKU: 24-MB01]).
-
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.
-
Go to CLI and execute cron and wait till the schedule is applied.
code language-none bin/magento cron:run && bin/magento cron:run
-
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:
- Adobe Commerce or Magento Open Source on-premises: Quality Patches Tool > Usage in the Quality Patches Tool guide.
- Adobe Commerce on cloud infrastructure: Upgrades and Patches > Apply Patches in the Commerce on Cloud Infrastructure guide.
Related reading
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches in the support knowledge base.
- Check if patch is available for your Adobe Commerce issue using Quality Patches Tool in the Quality Patches Tool guide.
For info about other patches available in QPT, refer to Quality Patches Tool: Search for patches in the Quality Patches Tool guide.