Closed
Description
Magento version: 2.1.2
It is not possible to unselect and save all multiselect attribute values for a product.
After the save completes the state of the product attribute before the product was saved is unchanged.
It seems the problem is that the JS does not submit multiselect form elements with no selected values, at least on the server side completely unselected multiselect attribtues are not part of the $_POST['product']
array.
The exact same issue existed for years on M1 but was finally fixed there. It seems like this issue was introduced again for M2.
Preconditions
None special.
Steps to reproduce
- Create a custom multiselect attribute. Ot just install the sample data (e.g. the issue can be reproduced using the
features_bag
orstrap_bags
attributes). - Open the product in the admin interface.
- Select one or more values of the multiselect attribtue.
- Save
- Unselect all values of the multiselect attribute
- Save again
Expected result
The product attribute should have no value for the product.
Actual result
The previously selected product attributes still are selected.