The MDVA-29148 patch solves the issue where
\Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend does not assign the default value on save. This patch is available when the Quality Patches Tool (QPT) v.1.0.7 is installed. Please note that the issue is scheduled to be fixed in Magento version 2.4.2.
Affected products and versions
This patch was created for: Magento Commerce Cloud 2.3.3-p1.
Compatible with Magento versions: Magento Commerce/Magento Commerce Cloud >=2.3.0 <2.4.2.
Note: the patch might become applicable to other versions with new QPT tool releases. To check if the patch is compatible with your Magento version, run
./vendor/bin/magento-patches status .
When a product is created via an import script or the REST API, attributes that use the
\Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend backend model and have a default value, are not assigned the default value.
Steps to reproduce
- Create a new global attribute that uses the
\Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackendbackend model and a non-empty default value.
- Use the REST API to create a new product.
- Fetch that new product from the REST API and confirm that the attribute is not present in the products custom attributes.
Actual result The custom attribute default value was not saved to the product attribute.
Expected result The custom attribute default value was saved to the product attribute.
Apply the patch
For instructions on how to apply an QPT patch, use the following links depending on your Magento product:
- Magento Commerce: DevDocs Apply patches using Quality Patches Tool .
- Magento Commerce Cloud: DevDocs Upgrades and Patches > Apply patches .
To learn more about Quality Patches Tool, refer to:
- Quality Patches Tool released: a new tool to self-serve quality patches .
- Check if patch is available for your Magento issue using Quality Patches Tool .
For info about other patches available in QPT tool, refer to the Patches available in QPT tool section.