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?

3 Answers 3

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.

3
  • Magereport shows clear for 7405. Jun 2, 2017 at 12:28
  • @ChristopheMacAlister the magereport check does not check for every file it checks some frontend changes. Check the app/etc/applied.patches file Jun 2, 2017 at 12:39
  • 1
    This was my issue, was on Enterprise 1.14.2.2. Thanks Raphael
    – nshiff
    Jun 2, 2017 at 19:29
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

3
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.