Magento2: Catalog: Product: Impossible to set a value on the website scope for website-scoped attributes

Created on 2 Sep 2016  路  6Comments  路  Source: magento/magento2

the store view selector does not allow to select the website, only store views. the value of an attribute with scope "website" is actually stored in the catalog_product_entity table with the store_id of the currently selected storeview... which leads to invalid results

Preconditions

  1. CE 2.1.1
  2. a website (code: "this") with 2 store views ("de" + "fr")
  3. a website (code: "that") with 2 store views ("it" + "en")
  4. at least one product with both websites selected

    Steps to reproduce

part 1

  1. edit the product in the "All Store Views" first
  2. set "Enable Product" to "No" & save
  3. switch to "that: en" store view
  4. remove "Use Default Value" checkbox, set "Enable Product" to "Yes" & save
  5. switch to "that: it" store view

    part 2

  6. remove "Use Default Value" checkbox, set "Enable Product" to "Yes" & save

  7. switch to "that: en" store view
  8. set "Enable Product" to "No" & save
  9. check the entity table in the database

    Expected result

part 1

  1. "Enable Product > Use Default Value" is unchecked
  2. "Enable Product" should be "Yes"

    part 2

  3. only two records ("default" + "base") for the attribute "status" with "base" having value "2" (no)

    Actual result

Part 1

  1. "Enable Product > Use Default Value" is checked
  2. "Enable Product" is set to "No"

    part 2

  3. three records exist ("default" + "base: it" + "base: en") for the attribute "status", with "base: it" having "1" (yes) and "base: en" having "2" (no)

the resulting states are not valid for an attribute with scope "website" - the product eav ignores the "website" scope at and only seems to support "global" and "store".

Config Cannot Reproduce Confirmed Format is valid Ready for Work Reproduced on 2.1.x Reproduced on 2.2.x bug report

Most helpful comment

This is a big problem since products created with multiple storeviews (multi-language store) over REST API are affected by this too.
Tables catalog_product_entity_xxx are "polluted" with storeview-specific values even if attribute is defined as global or website scope.
We have to clean attribute data using tools like EAVCleaner or sql queries like:
from catalog_product_entity_int where store_id <> 0 and attribute_id in (select attribute_id from catalog_eav_attribute where is_global in (1,2));
( is_global =1 is global scope, is_global=2 is website scope ).
Please increase priority of this issue.

All 6 comments

Internal ticket created MAGETWO-58142. Thanks for reporting

@sevos1984 update on this issue please?

This is a big problem since products created with multiple storeviews (multi-language store) over REST API are affected by this too.
Tables catalog_product_entity_xxx are "polluted" with storeview-specific values even if attribute is defined as global or website scope.
We have to clean attribute data using tools like EAVCleaner or sql queries like:
from catalog_product_entity_int where store_id <> 0 and attribute_id in (select attribute_id from catalog_eav_attribute where is_global in (1,2));
( is_global =1 is global scope, is_global=2 is website scope ).
Please increase priority of this issue.

Any update of this issue? Same problem here changing scope from Website -> Global. The screen shows waiting and anything happens...

@heldchen, thank you for your report.
We've created internal ticket(s) MAGETWO-58142 to track progress on the issue.

Hi @heldchen.

Thank you for your report and collaboration!

The related internal Jira ticket MAGETWO-58142 was closed as non-reproducible in 2.3.x.
It means that Magento team either unable to reproduce this issue using provided _Steps to Reproduce_ from the _Description section_ on clean or the issue has been already fixed in the scope of other tasks.

But if you still run into this problem please update or provide additional information/steps/preconditions in the _Description section_ and reopen this issue.

Was this page helpful?
0 / 5 - 0 ratings