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.56k stars 9.32k forks source link

Product with any custom option causes an error when deleting product images #36566

Closed ksenia-zlotin closed 1 year ago

ksenia-zlotin commented 1 year ago

Preconditions and environment

Steps to reproduce

  1. create any product with any custom option and save.
  2. add a product image with any role or no roles at all and save.
  3. delete the product image and save

Expected result

Product is saved, image is deleted and no error or warning messages are shown

Actual result

Product is saved, image is deleted but an error/warning message is shown, stating: "The image cannot be removed as it has been assigned to the other image role"

Additional information

This seems to solely happen to products with custom options.

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

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


: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

m2-assistant[bot] commented 1 year 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 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

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

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

engcom-Bravo commented 1 year ago

Hi @ksenia-zlotin,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Steps to reproduce

1.create any product with any custom option and save. 2.add a product image with any role or no roles at all and save. 3.delete the product image and save.

yguiegfuh-Products-Inventory-Catalog-Magento-Admin

yguiegfuh-Products-Inventory-Catalog-Magento-Admin (1)

Could you please try with these steps.

Go to Stores > Attributes > Product
Change Scope to "Global" for the following attributes:

Kindly recheck the behavior on Magento 2.4-develop instance and elaborate steps to reproduce if the issue is still reproducible.

Thanks.

ksenia-zlotin commented 1 year ago

@engcom-Bravo It does not look like you actually added a custom option based on the screenshots provided. For me - it also works when no custom option is added. Please retest with a custom option added, as seen in this attached screenshot:

Screen Shot 2022-12-05 at 12 42 16 PM
engcom-Bravo commented 1 year ago

Hi @ksenia-zlotin,

Thanks for your Update.

Verified the issue on Magento 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots.

Steps to reproduce

1.create any product with any custom option and save. 2.add a product image with any role or no roles at all and save. 3.delete the product image and save.

Product is saved successfully and image also deleted.but warning message is shown.

Screenshot 2022-12-07 at 8 35 44 PM

Product without custom options we are not getting any warning message.

Hence confirming this issue.

Thanks.

github-jira-sync-bot commented 1 year ago

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

m2-assistant[bot] commented 1 year ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

adamphh commented 1 year ago

@magento I am working on this

adamphh commented 1 year ago

@magento run all tests

CGLOB commented 1 year ago

Internal team is working on it.

chittima commented 1 year ago

Here is the commit id : https://github.com/magento/magento2/commit/423cd2a2466167e929efa1cfbf8eb4821489a714

hostep commented 1 year ago

Commit mentioned above seems to be too broad, it contains many other tickets as well. I think the following commits are the correct ones: https://github.com/magento/magento2/search?q=ACP2E-1479&type=commits, but no clean merge commit unfortunately :(

INPVLSA commented 8 months ago

Still actual on 2.4.6-p3

Commit mentioned above seems to be too broad, it contains many other tickets as well. I think the following commits are the correct ones: https://github.com/magento/magento2/search?q=ACP2E-1479&type=commits, but no clean merge commit unfortunately :(

Unfortunately, there are only error messages snoozing on product saving here:

As a result - no message "The image cannot be removed as it has been assigned to the other image role" after saving the product, but the image still exists for the product