3

I'm attempting to apply patch 9697 (via patch PATCH_SUPEE-9767_CE_1.9.3.0_v1-2017-05-25-09-09-56) to Magento CE 1.9.2.2 however it's failing. The log states:

Hunk #5 succeeded at 485 (offset 1 line).
patching file app/code/core/Mage/Checkout/etc/system.xml
patching file app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
Hunk #1 succeeded at 282 (offset -1 lines).
patching file app/code/core/Mage/Core/Controller/Front/Action.php
patching file app/code/core/Mage/Core/Controller/Request/Http.php
can't find file to patch at input line 351
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|
|index 14c4d98..176c17b 100644
|--- app/code/core/Mage/Core/Model/File/Validator/Image.php
|+++ app/code/core/Mage/Core/Model/File/Validator/Image.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
2 out of 2 hunks ignored

However when I have a look in app/code/core/Mage/Core/Model/File/Validator there is no Image.php file. I've also downloaded a fresh 1.9.2.2 and there is no Image.php file there either. Has anyone else had this problem?

Raphael at Digital Pianism
  • 70,385
  • 34
  • 188
  • 352

3 Answers3

3

You're getting this error because you are missing the SUPEE-7405 patch. This patch adds the app/code/core/Mage/Core/Model/File/Validator/Image.php file.

I strongly suggest you run your website against magereport.com to check which patch you're missing and install the missing patches before this one.

Raphael at Digital Pianism
  • 70,385
  • 34
  • 188
  • 352
1

I am pretty Sure that you are getting error in this file checking file app/code/core/Mage/Core/Model/File/Validator/Image.php because of following reasons:

1st Reason:

May be this file has wrong file permission set 644 default permission to this file and check

2nd Reason:

You have manually modified this file: in this case download magento 1.9.3 and revert this file from that version and apply this patch after that again put your custom code into that.

I Advice you to not to modify core files instead rewriting the classes

Murtuza Zabuawala
  • 14,814
  • 9
  • 44
  • 75
0

Magereport.com showed that 7405 was applied correctly and when attempting to apply the 7405 patch I got messages saying that it looks like the patch has been previously applied.

However, I downloaded Image.php from A Github Repo of prepatched Magento files and ran the patch again. This time it worked.