Magento 2.4.7 and all others including MCLOUD-10032 patch.
You should have at least one website and several stores attached to it.
You should have an attribute that should have a Website Scope.
Steps to reproduce
Let's assume that we have a website called test_website and 3 stores attached to it: be_store (with id 1), at_store (with id 2), uk_store (with id 3). Also, we have an attribute called show_discount which is a simple Yes/No in Catalog Input Type for Store Owner, and also it should be on a Website scope. To reproduce a bug, we should do the next:
Load a product using the repository and specify any store ID of a website. (let it be the be_store with id 1 from the example).
Because the attribute is managed on the Website scope, it should be updated for all store views attached to a website test_website, meaning that for all be_store, at_store, and uk_store stores, an attribute show_discount will be enabled. And have corresponding values in catalog_product_entity_int table.
Actual result
The attribute value was changed only for the be_store without taking into account the fact that the attribute is managed on the Website scope.
Preconditions and environment
Steps to reproduce
Let's assume that we have a website called
test_website
and 3 stores attached to it:be_store
(with id 1),at_store
(with id 2),uk_store
(with id 3). Also, we have an attribute calledshow_discount
which is a simpleYes/No
inCatalog Input Type for Store Owner
, and also it should be on a Website scope. To reproduce a bug, we should do the next:be_store
with id 1 from the example).show_discount
attribute value from 0 to 1 by using the next code piece:Expected result
Because the attribute is managed on the Website scope, it should be updated for all store views attached to a website
test_website
, meaning that for allbe_store
,at_store
, anduk_store
stores, an attributeshow_discount
will be enabled. And have corresponding values incatalog_product_entity_int
table.Actual result
The attribute value was changed only for the
be_store
without taking into account the fact that the attribute is managed on the Website scope.Additional information
Because of the change to the function, it started to behave incorrectly: https://github.com/mage-os/mageos-magento2/blob/b6cc3c5c12c1b255bbf18e0c69b57d3e53fb9f73/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php#L326
Instead of processing attributes using: https://github.com/mage-os/mageos-magento2/blob/b6cc3c5c12c1b255bbf18e0c69b57d3e53fb9f73/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php#L186
And applying changes for attributes to Website in case it is on the website scope: https://github.com/mage-os/mageos-magento2/blob/b6cc3c5c12c1b255bbf18e0c69b57d3e53fb9f73/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php#L235C22-L235C22
We change it only for the one store, ignoring this crucial functionality https://github.com/mage-os/mageos-magento2/blob/b6cc3c5c12c1b255bbf18e0c69b57d3e53fb9f73/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php#L337C13-L337C14
Release note
No response
Triage and priority