cancel
Showing results for 
Search instead for 
Did you mean: 

Patch problems Please Help

Patch problems Please Help

Hello everyone, 
I am having an issue patching Magento, here is what I encountered.

Magento reported it's 1.9.2.1 when I first began

Ran SSH method via file and process below:

sh PATCH_SUPEE-9652_v2-2017-02-07-01-18-38.sh
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

Checking the applied.patches.list it appears it was successful

cat app/etc/applied.patches.list
2018-01-15 01:01:38 UTC | SUPEE-9652 | EE_1.14.3.1 | v1 | 4038f0785d828794083f53f10c01aaa6af403523 | Tue Jan 24 15:03:12 2017 +0200 | 9586981e6ca8b255014b242d50b68b88525b0754..4038f0785d828794083f53f10c01aaa6af403523
patching file lib/Zend/Mail/Transport/Sendmail.php

After the above was complete I cleared System > Cache Management > Flush Magento Cache and Flush JavaScript/CSS Cache.
Performed a reload of the admin panel and still notice that the footer and applied.patches.list still remain at 1.9.2.1.
Found this page stating it would never change, which troubled me. How will I ever know what version Magento really is on from here unless I upgrade?

Taking the information from the previous page I moved on to the next critical Magento message:

critical.png

 

The first patch I attempted with filename below applies to Magento version 1.9.1.0 -1.9.3.0
https://magento.com/tech-resources/download#download2034

PATCH_SUPEE-9767_CE_1.9.3.0_v2-2017-07-11-11-04-56.sh

But it failed with the following

sh PATCH_SUPEE-9767_CE_1.9.3.0_v2-2017-07-11-11-04-56.sh 
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Admin/Model/Session.php
patching file app/code/core/Mage/Adminhtml/Block/Checkout/Formkey.php
patching file app/code/core/Mage/Adminhtml/Block/Notification/Symlink.php
patching file app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php
patching file app/code/core/Mage/Adminhtml/Model/Config/Data.php
patching file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Symlink.php
patching file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php
patching file app/code/core/Mage/Checkout/controllers/MultishippingController.php
patching file app/code/core/Mage/Checkout/controllers/OnepageController.php
Hunk #1 succeeded at 350 (offset 1 line).
Hunk #2 succeeded at 366 (offset 1 line).
Hunk #3 succeeded at 413 (offset 1 line).
Hunk #4 succeeded at 442 (offset 1 line).
Hunk #5 succeeded at 481 (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
Hunk #1 succeeded at 178 with fuzz 2 (offset -10 lines).
patching file app/code/core/Mage/Core/Controller/Request/Http.php
can't find file to patch at input line 397
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..f817140 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
patching file app/code/core/Mage/Core/etc/config.xml
patching file app/code/core/Mage/Core/etc/system.xml
patching file app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.6.1.1-1.6.0.6.1.2.php
patching file app/code/core/Mage/Customer/Model/Session.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Adapter/Zend/Cache.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Container/Abstract.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Xml/Excel.php
patching file app/code/core/Mage/ImportExport/Model/Import/Uploader.php
patching file app/code/core/Mage/Sales/Model/Quote/Item.php
Hunk #1 FAILED at 500.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Sales/Model/Quote/Item.php.rej
patching file app/code/core/Mage/Widget/Model/Widget/Instance.php
patching file app/code/core/Mage/XmlConnect/Helper/Image.php
patching file app/code/core/Mage/XmlConnect/controllers/Adminhtml/MobileController.php
patching file app/design/adminhtml/default/default/layout/main.xml
patching file app/design/adminhtml/default/default/template/notification/formkey.phtml
patching file app/design/adminhtml/default/default/template/notification/symlink.phtml
patching file app/design/adminhtml/default/default/template/oauth/authorize/head-simple.phtml
patching file app/design/adminhtml/default/default/template/page/head.phtml
patching file app/design/frontend/base/default/template/checkout/cart/shipping.phtml
patching file app/design/frontend/base/default/template/checkout/multishipping/addresses.phtml
patching file app/design/frontend/base/default/template/checkout/multishipping/billing.phtml
patching file app/design/frontend/base/default/template/checkout/multishipping/shipping.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/billing.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/payment.phtml
Hunk #1 succeeded at 36 (offset -1 lines).
patching file app/design/frontend/base/default/template/checkout/onepage/shipping.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml
patching file app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml
patching file app/design/frontend/rwd/default/layout/page.xml
patching file app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
patching file app/design/frontend/rwd/default/template/checkout/multishipping/addresses.phtml
patching file app/design/frontend/rwd/default/template/checkout/multishipping/billing.phtml
patching file app/design/frontend/rwd/default/template/checkout/onepage/payment.phtml
Hunk #1 succeeded at 37 (offset -1 lines).
patching file app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml
patching file app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml
patching file app/locale/en_US/Mage_Adminhtml.csv
Hunk #1 succeeded at 1249 (offset -36 lines).
patching file app/locale/en_US/Mage_Core.csv
Hunk #1 succeeded at 401 (offset -6 lines).
patching file app/locale/en_US/Mage_Dataflow.csv
patching file app/locale/en_US/Mage_XmlConnect.csv
patching file downloader/Maged/Connect.php
patching file downloader/Maged/Controller.php
Hunk #1 succeeded at 417 (offset -4 lines).
Hunk #2 succeeded at 964 (offset -15 lines).
patching file downloader/Maged/Model/Session.php
Hunk #1 succeeded at 82 with fuzz 2.
Hunk #2 succeeded at 268 (offset -5 lines).
patching file js/lib/jquery/jquery-1.12.0.js
patching file js/lib/jquery/jquery-1.12.0.min.js
patching file js/lib/jquery/jquery-1.12.0.min.map
patching file js/varien/payment.js
patching file skin/frontend/base/default/js/opcheckout.js
Hunk #1 succeeded at 711 (offset 27 lines).


Then I thought maybe the initial successful patch SUPEE-9652 brought me to 1.9.3.2 and it's simply not being reported so I downloaded a version that supports Magento versions 1.9.3.1 and 1.9.3.2 via the filename below

PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh

but this failed as well

sh PATCH_SUPEE-9767_CE_1.9.3.2_v2-2017-07-11-11-06-06.sh 
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Admin/Model/Session.php
patching file app/code/core/Mage/Adminhtml/Block/Checkout/Formkey.php
patching file app/code/core/Mage/Adminhtml/Block/Notification/Symlink.php
patching file app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php
patching file app/code/core/Mage/Adminhtml/Model/Config/Data.php
patching file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Symlink.php
patching file app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php
patching file app/code/core/Mage/Checkout/controllers/MultishippingController.php
patching file app/code/core/Mage/Checkout/controllers/OnepageController.php
Hunk #1 succeeded at 350 (offset 1 line).
Hunk #2 succeeded at 366 (offset 1 line).
Hunk #3 succeeded at 413 (offset 1 line).
Hunk #4 succeeded at 442 (offset 1 line).
Hunk #5 succeeded at 481 (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
Hunk #1 succeeded at 178 with fuzz 2 (offset -10 lines).
patching file app/code/core/Mage/Core/Controller/Request/Http.php
can't find file to patch at input line 397
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 ca925bf..9d57202 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
patching file app/code/core/Mage/Core/etc/config.xml
patching file app/code/core/Mage/Core/etc/system.xml
patching file app/code/core/Mage/Core/sql/core_setup/upgrade-1.6.0.6.1.1-1.6.0.6.1.2.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Adapter/Zend/Cache.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Container/Abstract.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Xml/Excel.php
patching file app/code/core/Mage/ImportExport/Model/Import/Uploader.php
patching file app/code/core/Mage/Sales/Model/Quote/Item.php
Hunk #1 FAILED at 500.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Sales/Model/Quote/Item.php.rej
patching file app/code/core/Mage/Widget/Model/Widget/Instance.php
patching file app/code/core/Mage/XmlConnect/Helper/Image.php
patching file app/code/core/Mage/XmlConnect/controllers/Adminhtml/MobileController.php
patching file app/design/adminhtml/default/default/layout/main.xml
patching file app/design/adminhtml/default/default/template/notification/formkey.phtml
patching file app/design/adminhtml/default/default/template/notification/symlink.phtml
patching file app/design/adminhtml/default/default/template/oauth/authorize/head-simple.phtml
patching file app/design/adminhtml/default/default/template/page/head.phtml
patching file app/design/frontend/base/default/template/checkout/cart/shipping.phtml
patching file app/design/frontend/base/default/template/checkout/multishipping/addresses.phtml
patching file app/design/frontend/base/default/template/checkout/multishipping/billing.phtml
patching file app/design/frontend/base/default/template/checkout/multishipping/shipping.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/billing.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/payment.phtml
Hunk #1 succeeded at 36 (offset -1 lines).
patching file app/design/frontend/base/default/template/checkout/onepage/shipping.phtml
patching file app/design/frontend/base/default/template/checkout/onepage/shipping_method.phtml
patching file app/design/frontend/base/default/template/persistent/checkout/onepage/billing.phtml
patching file app/design/frontend/rwd/default/layout/page.xml
patching file app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
patching file app/design/frontend/rwd/default/template/checkout/multishipping/addresses.phtml
patching file app/design/frontend/rwd/default/template/checkout/multishipping/billing.phtml
patching file app/design/frontend/rwd/default/template/checkout/onepage/payment.phtml
Hunk #1 succeeded at 37 (offset -1 lines).
patching file app/design/frontend/rwd/default/template/checkout/onepage/shipping.phtml
patching file app/design/frontend/rwd/default/template/persistent/checkout/onepage/billing.phtml
patching file app/etc/config.xml
patching file app/locale/en_US/Mage_Adminhtml.csv
Hunk #1 succeeded at 1249 (offset -36 lines).
patching file app/locale/en_US/Mage_Core.csv
Hunk #1 succeeded at 401 (offset -6 lines).
patching file app/locale/en_US/Mage_Dataflow.csv
patching file app/locale/en_US/Mage_XmlConnect.csv
patching file downloader/Maged/Connect.php
patching file downloader/Maged/Controller.php
Hunk #1 succeeded at 417 (offset -4 lines).
Hunk #2 succeeded at 964 (offset -15 lines).
patching file downloader/Maged/Model/Session.php
Hunk #1 succeeded at 82 with fuzz 2.
Hunk #2 succeeded at 268 (offset -5 lines).
patching file js/lib/jquery/jquery-1.12.0.js
patching file js/lib/jquery/jquery-1.12.0.min.js
patching file js/lib/jquery/jquery-1.12.0.min.map
patching file js/varien/payment.js
patching file skin/frontend/base/default/js/opcheckout.js
Hunk #1 succeeded at 711 (offset 27 lines).

 

 

Anything stand out here, this is my first introduction to Magento, and certainly the first at patching. If there is anything I can provide further please let me know.

Thank you,
Rob

Tags (1)
1 REPLY

Re: Patch problems Please Help

Hi,

 

PATCH_SUPEE-9767_CE_1.9.3.0_v2-2017-07-11-11-04-56.sh will have been the right patch to apply. It doesn't upgrade you to 1.9.3.2, just applies the required security patch. 

 

Unfortunately, there's no quick solution here. There's pretty much only one reason that patches don't apply and that's that the code that they're looking for to replace/update isn't where the patch is expecting. You will need to apply the first patch again but investigate each time where it fails to apply, look at the file and lines it's trying to find and replace and identify why it's not working. Manual resolution is possible though a bit time-consuming. 

 

The patches are written in such a way that assumes that you have correctly applied all previously released patches so that could be one reason why they're not applying successfully. 

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!