-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Description
Preconditions and environment
Tested on 2.4.7-p6 and 2.4.8-p1
Steps to reproduce
- Create a dropdown or multi-select product attribute
- Using two synchrone PHP processes add an option with the same Admin value
- The attribute now contains two options with the same Admin value, which is not allowed
Cause: No lock is being placed allowing multiple processes to alter the EAV attribute
Solution: Use a write lock on the EAV attribute
This situation might be very unlikely when updating EAV attributes through the backend of Magento. When updating EAV attributes automatically, for example with a PIM integration, this does occur from time to time.
Expected result
One of the processes updating the EAV attribute should get an error or options should be combined automatically based on the Admin values.
Actual result
The attribute contains duplicate option values for the Admin.
Additional information
I'm not 100% sure if unique Admin option values is a requirement for catalog EAV attributes, or just EAV attributes in general. It makes sense to restrict duplicates in general, the current validation however is implemented in the Magento\Catalog\Controller\Adminhtml\Product\Attribute\Validate
controller.
Release note
Workaround: Open the EAV attribute in backend and remove duplicate Admin option values.
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status