ACSD-63454: Default value for a Dropdown and Multiple Select attributes is not saved properly in the database
- Topics:
- Attributes
- Products
CREATED FOR:
- Experienced
- Admin
- Developer
The ACSD-63454 patch fixes the issue where the default value for a Dropdown and Multiple Select attributes is not saved properly in the database. This patch is available when the Quality Patches Tool (QPT) 1.1.59 is installed. The patch ID is ACSD-63454. Please note that the issue is scheduled to be fixed in Adobe Commerce 2.4.8.
Affected products and versions
The patch is created for Adobe Commerce version:
- Adobe Commerce (all deployment methods) 2.4.7-p2
Compatible with Adobe Commerce versions:
- Adobe Commerce (all deployment methods) 2.4.7 - 2.4.7-p3
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
The default value for Dropdown and Multiple Select attributes is not saved correctly in the database; instead of updating the default value, the new value is appended to the old one, separated by a comma.
Steps to reproduce:
-
Login to the backend, go to Stores > Attributes > Product.
-
Click Add New Attribute.
-
In the Properties tab, set the following:
- Default Label: test
- Catalog Input Type for Store Owner: Multiple Select
- Manage Options: Add two options without selecting Is Default.
-
Click Save Attribute.
-
Check in the databasse that the
default_value
column is empty.select attribute_code, default_value from eav_attribute where attribute_code = 'test';
-
Go back and set one of the two options as Is Default.
-
Check the database again to ensure that
default_value
now contains the selected option ID. -
Go back and change the default option by selecting the other option.
Expected results:
The new default value should replace the old value in the database.
Actual results:
Instead of replacing the default value with the new one, it appends the new value to the old value, separated by a comma.
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: A self-service tool for quality patches in the Tools guide.