Closed kimurabanyan closed 1 year ago
Hi @kimurabanyan. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
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
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
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.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento give me 2.4-develop instance
Hi @kimurabanyan. Thank you for your request. I'm working on Magento instance for you.
Hi @kimurabanyan, here is your Magento Instance: https://bca016973b0baca0f71c0f68a1856eda.instances.magento-community.engineering Admin access: https://bca016973b0baca0f71c0f68a1856eda.instances.magento-community.engineering/admin_de08 Login: 62865682 Password: 9577e569b258
Reproduced in 2.4-develop instance
Step1
result of Step4
Hi @engcom-Hotel. 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:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @kimurabanyan,
Thank you for reporting the issue.
We have verified the issue on Magento 2.4-develop branch however the issue is not reproducible for us.
Steps performed: 1:Install a clean version of Magento version 2.4-develop 2:Create a product attribute with a backend type of varchar, text, or DateTime and set default value at "Advanced Attribute Properties > Default Value", and add that attribute to any attribute set. 3:Create a product of attribute set with attribute created in Step 2. 4:.Uncheck the "Use Default" checkbox for that attribute in the Store View scope and save as shown in the screenshot
5: Check the "Use Default" checkbox for that attribute in the Store View scope and save
Result: The "Use Default" checkbox for that attribute is checked in the Store View scope Please let us know in case we are missing anything with exact reproducible steps, will retry with that scenario.
Thanks
@magento give me 2.4-develop instance
Hi @kimurabanyan. Thank you for your request. I'm working on Magento instance for you.
Hi @kimurabanyan, here is your Magento Instance: https://bca016973b0baca0f71c0f68a1856eda.instances.magento-community.engineering Admin access: https://bca016973b0baca0f71c0f68a1856eda.instances.magento-community.engineering/admin_65a0 Login: 15707ab4 Password: 7c775d119790
Hi @engcom-Hotel
Thank you for confirming.
I confirmed that it would be reproduced again. Is your procedure missing the following step?
set default value at "Advanced Attribute Properties > Default Value",
As you can see in the red frame in the image below, this problem only occurs with attributes that have "Default Value". Perhaps you checked without setting the "Default Value".
Using the above attribute, the problem was reproduced as shown in the image below.
Please confirm again.
Thanks.
Hi @kimurabanyan,
Thank you for reporting the issue.
We have verified the issue on Magento 2.4-develop branch however the issue is reproducible
Steps performed: 1:Install a clean version of Magento version 2.4-develop 2:Create a product attribute with a backend type of varchar, text, or DateTime and set default value at "Advanced Attribute Properties > Default Value", and add that attribute to any attribute set. 3:Create a product of attribute set with attribute created in Step 2. 4:.Uncheck the "Use Default" checkbox for that attribute in the Store View scope and save as shown in the screenshot
5: Check the "Use Default" checkbox for that attribute in the Store View scope and save
Result: The "Use Default" checkbox for that attribute is not checked as shown in screenshot Based on the above observation, confirming the issue.
Thanks!
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-2444 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Delta. Thank you for verifying the issue.
Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
@engcom-Delta Please check the impact of the checkbox. This will help us in setting the priority.
Thanks
Hi @engcom-Delta. 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:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @kimurabanyan, Based on above description confirming the issue. We have verified the issue on Magento 2.4-develop branch however the issue is reproducible and so marking the issue confirmed. https://github.com/magento/magento2/issues/35096#issuecomment-1046939040
:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-2444
The cause of this is thought to be the following line. If the attribute has a default value, "false" is not set and the store view record is not deleted. https://github.com/magento/magento2/blob/2.4.3-p1/app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/AttributeFilter.php#L83
it works on 2.4.5. I compared this file to 2.4.2 where i can reproduce this issue and i see only one difference in this file:
// M2.4.5
private function isAttributeShouldNotBeUpdated(Product $product, array $useDefaults, $attribute, $value): bool
{
$considerUseDefaultsAttribute = !isset($useDefaults[$attribute]) || $useDefaults[$attribute] === '1';
return ($value === '' && $considerUseDefaultsAttribute && ($product->getData($attribute) === null));
}
// 2.4.2
private function isAttributeShouldNotBeUpdated(Product $product, array $useDefaults, $attribute, $value): bool
{
$considerUseDefaultsAttribute = !isset($useDefaults[$attribute]) || $useDefaults[$attribute] === '1';
return ($value === '' && $considerUseDefaultsAttribute && !$product->getData($attribute));
}
i tried to apply this change to 2.4.2 and it did not help
I have the same issue on a Magento 2.4.5-p1, it seems to be related to this line.
There is a confusion between the attribute's default value, and the checkbox "Use default value" which refers to the "All store views" scope.
The internal team is working on this issue. Thanks
We are still seeing this issue on 2.4.6-p3
Has anyone found a patch or fix for this please?
@dragonfly4 the fix is to create a patch to change this line: vendor/magento/module-customer-custom-attributes/Plugin/Catalog/UpdateMultiselectAttributes.php:32
, from == null
to === null
Hope it helps.
We are still seeing this issue on 2.4.6-p4
Hello,
We have Verified the issue in Magento 2.4 dev instance and the issue is not reproducible.
Steps to reproduce:
1.Create a product attribute with a backend type of varchar, text or datetime and set default value at "Advanced Attribute Properties > Default Value", and add that attribute to any attribute set. 2.Create a product of attribute set with attribute created in Step1 3.Uncheck the "Use Default Value" checkbox for that attribute in the Store View scope and save 4.Check the "Use Default Value" checkbox for that attribute in the Store View scope and save
ACTUAL RESULTS:
The "Use Default Value" checkbox for that attribute is checked in the Store View scope
EXPECTED RESULTS:
The "Use Default Value" checkbox for that attribute is checked in the Store View scope
Please refer the evidence video attached.
https://github.com/magento/magento2/assets/51681379/3ad6d077-a9f9-4fc5-9bc1-a3a7458bc5a3
Hello @engcom-Delta, could you please check again with a multiselect attribute with a default value? We are still seeing this on 2.4.6-p3.
Seems to me the attribute data is not correctly emptied when send to the save controller. Here I ticked the "use default", but I am still receiving the attribute value in \Magento\CustomerCustomAttributes\Plugin\Catalog\UpdateMultiselectAttributes::afterInitializeFromData.
We are still seeing this issue on 2.4.6-p5. Can we get a quality patch to fix the === in \Magento\CustomerCustomAttributes\Plugin\Catalog\UpdateMultiselectAttributes::afterInitializeFromData ?
We are having the same issue except we are NOT using a Default Value for our MultiSelect attribute. 2.4.6-p5
Cannot check "Use Default Value" and have it save correctly. Attribute remains unchecked
Hi @helloeverything and @frostitution ,
We have Verified the issue in Magento 2.4.6-p5 instance and the issue is reproducible.
Steps to reproduce:
1.Create a product attribute with a backend type of varchar, text or datetime and set default value at "Advanced Attribute Properties > Default Value", and add that attribute to any attribute set. 2.Create a product of attribute set with attribute created in Step1 3.Uncheck the "Use Default Value" checkbox for that attribute in the Store View scope and save 4.Check the "Use Default Value" checkbox for that attribute in the Store View scope and save
ACTUAL RESULTS:
The "Use Default Value" checkbox for that attribute is unchecked in the Store View scope
EXPECTED RESULTS:
The "Use Default Value" checkbox for that attribute is checked in the Store View scope
https://github.com/magento/magento2/assets/51681379/268aad09-2519-4a04-989c-a5f1b8afb39a
Other things I noticed:
@spraxis This fix works, but does this have any possible effects on other things?
ISSUE:
Use Default Value checkbox not checked and value not showing for product attribute
STEPS TO REPLICATE:
ACTUAL RESULTS:
Checkbox not checked
EXPECTED RESULTS:
The "Use Default Value" checkbox for that attribute is checked in the Store View scope