0

I tried to apply this patch. I followed the instructions given on that link. How to Apply and Revert Magento Patches "How to apply a Magento Patch". But when I execute the script, this is printed on my screen:

Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

checking file app/code/core/Mage/Admin/Model/Session.php
checking file app/code/core/Mage/Adminhtml/Block/Checkout/Formkey.php
checking file app/code/core/Mage/Adminhtml/Block/Notification/Symlink.php
checking file app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php
checking file app/code/core/Mage/Adminhtml/Model/Config/Data.php
checking file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php
checking file app/code/core/Mage/Checkout/controllers/MultishippingController.php
checking file app/code/core/Mage/Checkout/controllers/OnepageController.php
Hunk #1 succeeded at 350 (offset 1 line).
Hunk #2 succeeded at 370 (offset 1 line).
Hunk #3 succeeded at 417 (offset 1 line).
Hunk #4 succeeded at 446 (offset 1 line).
Hunk #5 succeeded at 485 (offset 1 line).
checking file app/code/core/Mage/Checkout/etc/system.xml
checking file app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
Hunk #1 succeeded at 282 (offset -1 lines).
checking file app/code/core/Mage/Core/Controller/Front/Action.php
checking 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:
--------------------------
|diff --git app/code/core/Mage/Core/Model/File/Validator/Image.php app/code/core/Mage/Core/Model/File/Validator/Image.php
|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
checking file app/code/core/Mage/Core/etc/system.xml
checking file app/code/core/Mage/Customer/Model/Session.php
checking file app/code/core/Mage/Dataflow/Model/Convert/Adapter/Zend/Cache.php
checking file app/code/core/Mage/Dataflow/Model/Convert/Container/Abstract.php
checking file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
checking file app/code/core/Mage/Dataflow/Model/Convert/Parser/Xml/Excel.php
checking file app/code/core/Mage/ImportExport/Model/Import/Uploader.php
checking file app/code/core/Mage/Sales/Model/Quote/Item.php
Hunk #1 FAILED at 500.
1 out of 1 hunk FAILED
checking file app/code/core/Mage/Widget/Model/Widget/Instance.php
checking file app/code/core/Mage/XmlConnect/Helper/Image.php
checking file app/code/core/Mage/XmlConnect/controllers/Adminhtml/MobileController.php
checking file app/design/adminhtml/default/default/layout/main.xml
checking file app/design/adminhtml/default/default/template/notification/formkey.phtml
checking file app/design/adminhtml/default/default/template/notification/symlink.phtml
checking file app/design/adminhtml/default/default/template/page/head.phtml
checking file app/design/frontend/base/default/template/checkout/cart/shipping.phtml
checking file app/design/frontend/base/default/template/checkout/multishipping/billing.phtml
checking file app/design/frontend/base/default/template/checkout/multishipping/shipping.phtml
checking file app/design/frontend/base/default/template/checkout/onepage/billing.phtml
checking file app/design/frontend/base/default/template/checkout/onepage/payment.phtml
Hunk #1 succeeded at 35 (offset -1 lines).
checking file app/design/frontend/base/default/template/checkout/onepage/shipping.phtml
checking file app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml
checking file app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml
can't find file to patch at input line 900
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/design/frontend/rwd/default/layout/page.xml app/design/frontend/rwd/default/layout/page.xml
|index 22a2fe6..b600f74 100644
|--- app/design/frontend/rwd/default/layout/page.xml
|+++ app/design/frontend/rwd/default/layout/page.xml
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 913
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
|index 4ee6d76..47c3a79 100644
|--- app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
|+++ app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 925
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/design/frontend/rwd/default/template/checkout/multishipping/addresses.phtml app/design/frontend/rwd/default/template/checkout/multishipping/addresses.phtml
|index bf6dfcc..6cab97a 100644
|--- app/design/frontend/rwd/default/template/checkout/multishipping/addresses.phtml
|+++ app/design/frontend/rwd/default/template/checkout/multishipping/addresses.phtml
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 935
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/design/frontend/rwd/default/template/checkout/multishipping/billing.phtml app/design/frontend/rwd/default/template/checkout/multishipping/billing.phtml
|index f0008f8..74b889e 100644
|--- app/design/frontend/rwd/default/template/checkout/multishipping/billing.phtml
|+++ app/design/frontend/rwd/default/template/checkout/multishipping/billing.phtml
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 947
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/design/frontend/rwd/default/template/checkout/onepage/payment.phtml app/design/frontend/rwd/default/template/checkout/onepage/payment.phtml
|index 52accb1..b175ace 100644
|--- app/design/frontend/rwd/default/template/checkout/onepage/payment.phtml
|+++ app/design/frontend/rwd/default/template/checkout/onepage/payment.phtml
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 959
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml
|index 8f88c8e..b45b524 100644
|--- app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml
|+++ app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
can't find file to patch at input line 971
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml
|index bec2a6e..da8b710 100644
|--- app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml
|+++ app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
checking file app/etc/config.xml
checking file app/locale/en_US/Mage_Adminhtml.csv
Hunk #1 succeeded at 1281 (offset -4 lines).
checking file app/locale/en_US/Mage_Core.csv
Hunk #1 succeeded at 404 (offset -3 lines).
checking file app/locale/en_US/Mage_Dataflow.csv
checking file app/locale/en_US/Mage_XmlConnect.csv
checking file downloader/Maged/Connect.php
Hunk #1 FAILED at 396 (different line endings).
Hunk #2 FAILED at 442 (different line endings).
Hunk #3 FAILED at 451 (different line endings).
3 out of 3 hunks FAILED
checking file downloader/Maged/Controller.php
Hunk #1 FAILED at 421 (different line endings).
Hunk #2 FAILED at 979 (different line endings).
2 out of 2 hunks FAILED
checking file downloader/Maged/Model/Session.php
Hunk #1 FAILED at 82 (different line endings).
Hunk #2 FAILED at 259 (different line endings).
2 out of 2 hunks FAILED
checking file js/lib/jquery/jquery-1.12.0.js
checking file js/lib/jquery/jquery-1.12.0.min.js
checking file js/lib/jquery/jquery-1.12.0.min.map
checking file js/varien/payment.js
Hunk #1 FAILED at 31 (different line endings).
1 out of 1 hunk FAILED
checking file skin/frontend/base/default/js/opcheckout.js
Hunk #1 succeeded at 711 (offset 27 lines).

Even with the differents subjects treating about "patch problems", I have no Idea what to do.

Like: checking file app/code/core/Mage/Sales/Model/Quote/Item.php Hunk #1 FAILED at 500 Do I have to check that file at line 500? I didn't saw anything I could change there...

If you have any idea of what to do or where I should search, It would be perfect.

Thank you.

  • Have you modified core magento files? – jscar Jun 1 '17 at 9:51
2

I am pretty Sure that you are getting error in this file checking file app/code/core/Mage/Sales/Model/Quote/Item.php because of following two reasons:

1st reason :

You Have not applied SUPEE-7405 : In this case first Apply SUPEE-7405 and then Apply this patch

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.

0

Thank you for your answer. I tried to apply SUPEE-7405, but same issue: error here :

checking file lib/Varien/File/Uploader.php
Hunk #1 FAILED at 125 (different line endings).
Hunk #2 FAILED at 209 (different line endings).
Hunk #3 FAILED at 253 (different line endings).
Hunk #4 FAILED at 350 (different line endings).
Hunk #5 FAILED at 431 (different line endings).
Hunk #6 FAILED at 505 (different line endings).
6 out of 6 hunks FAILED
checking file lib/Varien/Io/File.php
Hunk #1 FAILED at 233 (different line endings).
1 out of 1 hunk FAILED

I tried looking at that file, but nothing seemed wrong to me. I'm using magento 1.9.2.2, and tried to replace the code by the downloaded one. But I still have the same issues. (Even when I tried to purge the cache) (I successfully applied SUPEE-7616)

Thank's for your help!

EDIT:It worked for most of it EDIT 2 : I had to change several pieces of code. But It finaly worked. I now have to see closer, if some of these changes aren't destroying my actual configuration.

0

This is probably be due to the files using "Windows line endings" and trying to apply a Linux patch.

The following will convert the files :-

Log on in using ssh, navigate to the Mage directory and run

find . -type f -exec dos2unix {} \;

make sure you back up your site first!

Good luck

Peter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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