-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Image resize queue error due to .tmp file handling when deleting unsaved product images #39146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @kapilpandya2203. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
@magento give me 2.4-develop instance |
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Bravo, here is your Magento Instance: https://9c10b8a9a6b79402f15f816d06a43c67.instances-prod.magento-community.engineering |
Hi @kapilpandya2203, Thanks for your reporting and collaboration. We have verified the issue in Latest 2.4-develop instance and the issue is reproducible.Kindly refer the screenshots. Steps to reproduce
![]() As the image was not saved to the product, but the image is getting added to the queue for image resize. Hence Confirming the issue. Thanks. |
✅ Jira issue https://jira.corp.adobe.com/browse/AC-12941 is successfully created for this GitHub issue. |
✅ Confirmed by @engcom-Bravo. Thank you for verifying the issue. |
@magento I am working on this |
…n deleting unsaved product images - clean up removed images from the image array
…n deleting unsaved product images - static tests fix
…n deleting unsaved product images - copyright
…n deleting unsaved product images - fix for static tests
Preconditions (*)
Description (*)
When we upload an image to the product and without saving the product again we delete the image and then we save the product, the image is added for resize in queue. And the error of system message is shown with failure of queue message.
Screenshot 1:

Screenshot 2:

Screenshot 3:

Steps to reproduce (*)
Expected result (*)
As the image was not saved to the product, hence the image should not be added to the queue for image resize.
Actual result (*)
As the image was not saved to the product, but the image is getting added to the queue for image resize.
Additional information (*)
When we upload the image, a copy of the image is created in tmp folder. And when we remove the image without saving the product the image in the tmp folder is not removed and hence the path of the image is sent to the Image resize queue due to which the consumer is not able to locate the .tmp image file in pub/media/catalog/product path as the .tmp image never existed in the given path.
Hence, it results into the failure of queue and it throws a system message.
Files:
Upload controller is called when we upload a image and it sets the response and send it to the ImageResizeAfterProductSave observer in which the image file name is sent to the queue using ImageResize.
Even if we remove the product image right after uploading it and without saving the product, Upload controller still send the image path with .tmp extension to the observer and from there it goes to queue which fails afterwards.
Screenshot 4:

The text was updated successfully, but these errors were encountered: