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

Fixed pointless exception in logs every time a category with image is saved #9904

Conversation

woutersamaey
Copy link
Contributor

@woutersamaey woutersamaey commented Jun 11, 2017

Fixed a pointless exception in the logs every time a category is saved that has an image, even when nothing was changed.
When no image is uploaded, there is no need to try to process it.

Currently there is a try catch which writes an error to the log, but this is also triggered when no image is changed or uploaded. The log thus contains errors that aren't problematic.

Description

Fixed superflous exception from logs every time a category (with image) is saved, even when no changes were made to the category,

Fixed Issues (if relevant)

  1. Fixed a superflous error message from getting in the logs. This alarms the developer/shopkeeper when there is actually no problem at all.

Manual testing scenarios

  1. Save a category that has an image. No need to change anything really.
  2. The exception log should not contain a "critical" exception about a problem writing the file.

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)

@okorshenko
Copy link
Contributor

HI @woutersamaey
Thank you for your fix. Could you please fix broken tests so that we can proceed with Pull Requests acceptance?

Thank you

@okorshenko okorshenko self-assigned this Jun 30, 2017
@okorshenko okorshenko added this to the June 2017 milestone Jun 30, 2017
@okorshenko okorshenko modified the milestones: June 2017, July 2017 Jul 2, 2017
@magento-team magento-team merged commit 5e7c906 into magento:develop Jul 6, 2017
magento-team pushed a commit that referenced this pull request Jul 6, 2017
…y with image is saved #9904

 - fixed unit tests and code style
magento-team pushed a commit that referenced this pull request Jul 6, 2017
nemesis-back added a commit to nemesis-back/magento2 that referenced this pull request Nov 20, 2017
magento-team pushed a commit that referenced this pull request Dec 13, 2017
…h existing imag… #12368

 - Merge Pull Request #12368 from nemesis-back/magento2:backport/8069-category-save-image-exception
 - Merged commits:
   1. 5d1ec8b
magento-team pushed a commit that referenced this pull request Dec 13, 2017
@Ctucker9233
Copy link

@magento-team What version of 2.2 will have this fix? It's not in 2.2.7.

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