Skip to content
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

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

Merged
merged 1 commit into from
Oct 4, 2017

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