Open abramchukm opened 11 months ago
Hi @abramchukm. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hi @engcom-November. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hello @abramchukm,
Thank you for the report and collaboration!
We tried to reproduce this on magento 2.4-develop as well as 2.4.7-beta2, but in our case it is not reproducible. We followed the below steps:
test_site
.be_store
(with id 2), at_store
(with id 3), uk_store
(with id 4).show_discount
with a simple Yes/No
in Catalog Input Type for Store Owner
, and with Website scope. show_discount
.Please take a look at the screenshot below:
But when the value was set to 1 using the custom module, it was reflected in all the stores.
Please find the custom module used to reproduce this issue, and let us know if we are missing anything. ScopeVendor.zip
Thank you.
Hi @engcom-November,
Thanks for trying to reproduce it. I was a bit mistaken in my steps to reproduce. I've tried your extension on the first try and it worked perfectly (for all stores values were inserted properly, all of them were 1) because we've inserted a new value here https://github.com/magento/magento2/blob/7d724b79ddc8fb3704007cc1167f25f4c3b852da/app/code/Magento/Eav/Model/Entity/AbstractEntity.php#L1721C16-L1721C16. However if you will try to switch it back (try to update it to 0 for the same store), you will see where the problem lies. https://github.com/magento/magento2/blob/7d724b79ddc8fb3704007cc1167f25f4c3b852da/app/code/Magento/Eav/Model/Entity/AbstractEntity.php#L1723
For me the result after updating this attribute looked like this: You can see that the value was updated only for one store for the attribute with ID 137.
I've reproduced it using a Magento 2.4.7-beta2 version.
Thank you.
Hello @abramchukm,
Thank you for the quick reply!
We were able to verify this issue on 2.4-develop, and also in 2.4.7-beta2. As you mentioned when changing the value back to 0, we were able to see that the value is changed in only one store and not in all the stores, even though the attribute has website scope.
Please take a look at the screenshot: After changing the attribute value back to 0
We can see that the value is changed for only one store.
Hence confirming this issue.
Thank you.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-10664 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-November. Thank you for verifying the issue.
Issue Available: @engcom-November, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
I can confirm that we have faced this issue on our project.
Hello,
I have worked on a PR. Though it is a first contribution and i can't understand why it won't pass the functional tests. I need a bit more time this week to investigate further. But if anyone amongst you has any inclue on wether the bugs are really related to my PR, please don't hesitate
Thanks,
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/magento/magento2/blob/7d724b79ddc8fb3704007cc1167f25f4c3b852da/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php#L326
Instead of processing attributes using https://github.com/magento/magento2/blob/7d724b79ddc8fb3704007cc1167f25f4c3b852da/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/magento/magento2/blob/7d724b79ddc8fb3704007cc1167f25f4c3b852da/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php#L235C16-L235C16
We change it only for the one store, ignoring this crucial functionality https://github.com/magento/magento2/blob/7d724b79ddc8fb3704007cc1167f25f4c3b852da/app/code/Magento/Catalog/Model/ResourceModel/AbstractResource.php#L337C12-L337C12
Release note
No response
Triage and priority