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

Some Files Disappeared After Deleting a Folder in Media Gallery #38015

Open suganu25 opened 1 year ago

suganu25 commented 1 year ago

Preconditions

  1. Magento OpenSource 2.4.4/2.4.3

Steps to reproduce

  1. Login the Magento Back Office.
  2. Create two folders with matching prefixes on the same path in Media Gallery, for example, one named “abc” and the other “abc123”. These two folders are in the “category” folder.
  3. Upload some files into both folders.
  4. Delete the “abc” folder using the delete button in Media Gallery.

Expected result

  1. The “abc” folder has been deleted.
  2. The “abc123” folder has not been deleted.
  3. All files in the “abc123” folder can be found.

Actual result

  1. The “abc” folder has been deleted (this is the same as the expected result above).
  2. The “abc123” folder has not been deleted (this is the same as the expected result above).
  3. All files in the “abc123” folder cannot be found.
  4. However, all files in the “abc123” folder have not actually been deleted, and we were able to make the files appear after running the command “php bin/magento media-gallery:sync”.

If someone knows how to avoid the problem, please let me know it.

m2-assistant[bot] commented 1 year ago

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

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, here is your Magento Instance: https://7a8b53601bbf0c566a91abe3992abfcb.instances-prod.magento-community.engineering Admin access: https://7a8b53601bbf0c566a91abe3992abfcb.instances-prod.magento-community.engineering/admin_ab3f Login: 908aa5c7 Password: bb4520fc3983

engcom-Bravo commented 1 year ago

Hi @suganu25,

Thank you for reporting and collaboration.

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

Steps to reproduce

Screenshot 2023-10-03 at 12 24 35 PM

After deleting abc we are not able to find files in abc123 since we have deleted only abc folder.

But by this command php bin/magento media-gallery:sync we are able to retrieve the files in abc123.

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 1 year ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9639 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.

shunmugakumaran commented 11 months ago

Hi the same issue reproducible in 2.4.6-p2 can we have any any patch regarding for this @engcom-Bravo

Screenshot from 2023-11-27 15-44-04

suganu25 commented 8 months ago

Hi @engcom-Bravo I wanted to bring to your attention that I've noticed a bug in the code, and I believe I have a potential fix for it. I have tested this fix in my local environment, and it appears to successfully resolve the issue. Best regards, 2C14EDEB-D041-42C3-9C50-5AF4F38F6E25 C239B249-6475-4BB1-802D-63773F7D141A