Skip to content

Product images gets removed from "Images And Videos" after validation alert. #7372

@candia

Description

@candia

When adding a new product with an image, if a validation error occurs when trying to save the prodcut, the images gets removed from the "Images And Videos" section. If you fix the validation conflict and try to save the product again, an error will occur with "The file "/home/user/www/pub/media/tmp/catalog/product/o/r/pic.png" doesn't exist or not a file"

Preconditions

  1. Magento CE 2.1.2
  2. New Product

Steps to reproduce

  1. Add new product
  2. Add image to product
  3. Force a validation error by using an already used URL Key for the product

Expected result

Magento should remember the image that was added before validation occurred and save the product with the image.

  1. Create product with image

Actual result

  1. The file "/home/user/www/pub/media/tmp/catalog/product/o/r/pic.png" doesn't exist or not a file

I checked the pub/media/tmp and the image was added to the folder, however once I click save and validation is triggered the image gets removed from the pub/media/tmp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: CatalogFixed in 2.2.xThe issue has been fixed in 2.2 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.1.xThe issue has been reproduced on latest 2.1 releaseReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releasebug report

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions