magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.53k stars 9.31k forks source link

Product attribute apply_to does not get validated when saving a product #38183

Open ksenia-zlotin opened 11 months ago

ksenia-zlotin commented 11 months ago

Preconditions and environment

Steps to reproduce

Expected result

Product attribute which is set to only show for simple product should not show

Actual result

Product attribute which is set to only show for simple product shows, and only disappears when re-selecting the attribute set which re-renders the form fields.

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 11 months ago

Hi @ksenia-zlotin. 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:

ksenia-zlotin commented 11 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 11 months ago

Hi @ksenia-zlotin. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 11 months ago

Hi @ksenia-zlotin, here is your Magento Instance: https://be65e39691b9aded8eaf4e3d90c45ff4.instances-prod.magento-community.engineering Admin access: https://be65e39691b9aded8eaf4e3d90c45ff4.instances-prod.magento-community.engineering/admin_5fa9 Login: 795821b2 Password: be9f76530674

ksenia-zlotin commented 11 months ago

Ahh there is no option to enable apply_to portion of a product attribute via the Magento instance as there is no access to install scripts or database...

m2-assistant[bot] commented 11 months ago

Hi @engcom-Bravo. 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:

engcom-Bravo commented 11 months ago

Hi @ksenia-zlotin,

Thank you for reporting and collaboration.

We have checked the issue in our local instance and also we don't have the option enable apply_to portion of a product attribute could you please provide more information how we can enable this option.

Thanks

ksenia-zlotin commented 11 months ago

@engcom-Bravo Two ways that can be done in core Magento: 1) a Magento data patch which creates the attribute with the apply_to configuration set to simple, or 2) creation of the attribute via the admin and then altering its apply_to in the catalog_eav_attribute table directly in the database.

m2-assistant[bot] commented 10 months ago

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:

engcom-November commented 10 months ago

Hello @ksenia-zlotin,

Thank you for the report and collaboration!

We were able to reproduce this issue on 2.4-develop. We created a data patch to add the custom product attribute with the option 'apply_to' => 'simple'. Please take a look at the screenshot below: After clicking Save & New or Save & Duplicate, we got the custom attribute field in the product page. image

As soon as the page is refreshed or the Attribute Set is reselected, the custom attribute field disappears. image

Hence confirming the issue.

Please find the below custom module used to add data patch. AttributeVendor.zip

Thank you.

github-jira-sync-bot commented 10 months ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-10606 is successfully created for this GitHub issue.

m2-assistant[bot] commented 10 months ago

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

github-jira-sync-bot commented 10 months ago

:x: You don't have permission to export this issue.