Skip to content

Conversation

raumatbel
Copy link
Contributor

@raumatbel raumatbel commented Sep 29, 2017

Fix the correct removal of the images and the removal of all images in the catalog

Description

When you want remove image from admin panel, this file is not removed correctly.
If the path of the image saved in the table catalog_product_entity_media_gallery is empty, this remove all the catalog.

Manual testing scenarios

For the first case.

  1. Upload image from admin panel
  2. Save product
  3. Remove this image
  4. Save product
    The file is not removed in pub/media/catalog/product/....

For the second case.

  1. Upload image from admin panel
  2. Save product
  3. Go to the DB to the table catalog_product_entity_media_gallery and remove the value of this image
  4. Remove this image from admin panel
  5. Save product
    All the files are removed in pub/media/catalog/product/....

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants