Skip to content
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

Product Attribute Type "Multiselect" Not Updated in EAV and Product_Flat Tables #3270

Open
empiricompany opened this issue May 17, 2023 · 3 comments

Comments

@empiricompany
Copy link
Contributor

Preconditions (*)

OpenMage 20.1.0-rc5 but also encountered in latest 1.9.4.5 magento version
php 7.4

Steps to reproduce (*)

  1. Create a new product attribute with this config:
    immagine

  2. Add same options value
    immagine

  3. Assign attribute to an Attribute Set

  4. Assign all options to a product
    immagine

  5. Remove one or more options from attribute
    immagine

Expected result (*)

  1. catalog_product_entity_text.value is updated without id of option deleted
  2. catalog_product_flat is updated without id of option deleted

Actual result (*)

  1. catalog_product_entity_text.value is not updated
    new value should be 238,239,240 without orphan 241 id option
    immagine

  2. also in catalog_product_flat column is not updated
    immagine

@loekvangool
Copy link
Contributor

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.

@kiatng
Copy link
Contributor

kiatng commented Aug 1, 2023

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.

@loekvangool
Copy link
Contributor

loekvangool commented Aug 1, 2023

[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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants