ÃÛ¶¹ÊÓƵ

ACSD-63454: Default value for a Dropdown and Multiple Select attributes is not saved properly in the database

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 ÃÛ¶¹ÊÓƵ Commerce 2.4.8.

Affected products and versions

The patch is created for ÃÛ¶¹ÊÓƵ Commerce version:

  • ÃÛ¶¹ÊÓƵ Commerce (all deployment methods) 2.4.7-p2

Compatible with ÃÛ¶¹ÊÓƵ Commerce versions:

  • ÃÛ¶¹ÊÓƵ Commerce (all deployment methods) 2.4.7 - 2.4.7-p3
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

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:

  1. Login to the backend, go to Stores > Attributes > Product.

  2. Click Add New Attribute.

  3. 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.
  4. Click Save Attribute.

  5. Check in the databasse that the default_value column is empty.

    select attribute_code, default_value from eav_attribute where attribute_code = 'test';

  6. Go back and set one of the two options as Is Default.

  7. Check the database again to ensure that default_value now contains the selected option ID.

  8. 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:

To learn more about Quality Patches Tool, refer to:

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