magento-lts
magento-lts copied to clipboard
Product Attribute Type "Multiselect" Not Updated in EAV and Product_Flat Tables
Preconditions (*)
OpenMage 20.1.0-rc5 but also encountered in latest 1.9.4.5 magento version php 7.4
Steps to reproduce (*)
-
Create a new product attribute with this config:
-
Add same options value
-
Assign attribute to an Attribute Set
-
Assign all options to a product
-
Remove one or more options from attribute
Expected result (*)
-
catalog_product_entity_text
.value is updated without id of option deleted -
catalog_product_flat
is updated without id of option deleted
Actual result (*)
-
catalog_product_entity_text
.value is not updated new value should be 238,239,240 without orphan 241 id option -
also in
catalog_product_flat
column is not updated
I've known this bug since it was still called Magento. I agree it's an imperfection but I have to add that all functionality seems to work just fine and as such I would classify this as a cosmetic issue.
I can confirm that for dropdown type such as color, if an option is deleted and there is a product with that color, the value in the table catalog_product_entity_int
would still have the deleted color.
[edit] It's a bug because if you load the product, it would have a color which no longer exist.
[edit] It's a bug because if you load the product, it would have a color which no longer exist.
AFAIK there is zero impact unless you actually examine the database row. OM silently ignores the deprecated value. Calls to getData()
, getAttributeText()
etc. have never lead me to major issues with this. There is no label associated anymore thus the label will never show up. The ID behind the label will also not show up in the front-end or admin.
That's no reason to not fix it, but IMO any fix would have to be low in complexity, be BC and have a negligible performance impact.