-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Magento 2.1 Multi Select Attribute doesn't save empty values #6281
Comments
This is a known issue, internal ticket id MAGETWO-57226. Thanks for posting |
@Corefix Update to 2.1.1. and report back or close this ticket otherwise. |
It still not works in 2.1.1. I will create a ticket on the partner portal as well. (hopefully it will get more priority) |
Still not works in 2.1.3 |
@seavenger this patch works for me: #6899 |
patch didn't work for me on 2.1.2 |
@roseofgold |
@nagno No I'm not sure. I just tried applying it again and now I can't use my admin :( |
@roseofgold your issue is probably not related to this patch or you have an interfering customisation. |
@nagno thought you might like to know (and for posterity) that it works for me in IE11 but not in Chrome (v55). It's probably some customization that causing problems as it works differently in different browsers. |
@roseofgold It is not working for us in any browser (even in a Vanilla Magento environment). It is still not working in 2.1.5. Progress so far: we got one not working patch from the support team and another one, which was breaking the attribute set change functionality (you wasn't able to select an attribute set for new products as well). |
@nagno Updating to 2.1.6 broke it all browsers and all environments. I believe this issue should not be closed. |
Seems like duplicate of #6253 #7687 #4545 |
Still experiencing this issue in 2.1.4 |
@Corefix, thank you for your report. |
Of course you are not able to reproduce it, because it was fixed in 2.1.8. (See changelog for 2.1.8) |
This issue still persist in Magento ver. 2.2.2 |
I Found Solution after R&D On Magento database. |
this happens in our v2.1.9 intermittently eventhough the attributes have Magento\Eav\Model\Entity\Attribute\Backend\ArrayBackend in its "backend_model" column. When saving a product, some attributes have ->getAttributeSetInfo() returns null and some others return an empty array. This causes \Magento\Eav\Model\Entity\Attribute\AbstractAttribute::isInSet($setId) to return different values regarding whether getAttributeSetInfo is null or an empty array. And later it causes function in \Magento\Eav\Model\Entity\AbstractEntity::_isApplicableAttribute() to return differently for each attribute. then it causes the foreach in \Magento\Eav\Model\Entity\AbstractEntity::walkAttributes to skip calling call_user_func_array on some attributes when those attributes have getAttributeSetInfo return empty array. I am proposing this patch in function \Magento\Framework\DataObject::__call
with
or in function \Magento\Eav\Model\Entity\Attribute\Set::addSetInfo($entityType, array $attributes, $setId = null)
with
|
Preconditions
Steps to reproduce
Expected result
Actual result
It looks like the empty fields are not included in the post request, which they should, since removing values is just as important as setting them :-)
The text was updated successfully, but these errors were encountered: