cancel
Showing results for 
Search instead for 
Did you mean: 

magento 1.6.2.0 SUPEE-7405 failing

magento 1.6.2.0 SUPEE-7405 failing

I'm trying to install the SUPEE 7405 patch on my 1.6.2.0 site.

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

patching file app/code/core/Mage/Admin/Model/Observer.php
patching file app/code/core/Mage/Admin/Model/Redirectpolicy.php
patching file app/code/core/Mage/Admin/Model/Resource/User.php
patching file app/code/core/Mage/Admin/Model/Session.php
patching file app/code/core/Mage/Admin/Model/User.php
patching file app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php
patching file app/code/core/Mage/Adminhtml/Block/Widget/Grid.php
patching file app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php
patching file app/code/core/Mage/Adminhtml/Helper/Sales.php
patching file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php
patching file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php
patching file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php
patching file app/code/core/Mage/Adminhtml/controllers/IndexController.php
patching file app/code/core/Mage/Authorizenet/Helper/Admin.php
patching file app/code/core/Mage/Authorizenet/Helper/Data.php
patching file app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php
patching file app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php
patching file app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php
patching file app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Image.php
patching file app/code/core/Mage/CatalogIndex/etc/config.xml
patching file app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php
patching file app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php
patching file app/code/core/Mage/Checkout/controllers/CartController.php
patching file app/code/core/Mage/Checkout/controllers/OnepageController.php
patching file app/code/core/Mage/Core/Controller/Response/Http.php
patching file app/code/core/Mage/Core/Helper/Data.php
patching file app/code/core/Mage/Core/Model/App.php
patching file app/code/core/Mage/Core/Model/Config.php
patching file app/code/core/Mage/Core/Model/Email/Template/Filter.php
Hunk #1 FAILED at 166.
Hunk #2 succeeded at 177 (offset -10 lines).
1 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Core/Model/Email/Template/Filter.php.rej
patching file app/code/core/Mage/Core/Model/Factory.php
patching file app/code/core/Mage/Core/Model/File/Validator/Image.php
patching file app/code/core/Mage/Core/Model/Input/Filter/MaliciousCode.php
patching file app/code/core/Mage/Core/Model/Session.php
patching file app/code/core/Mage/Customer/controllers/AccountController.php
Hunk #1 FAILED at 68.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Customer/controllers/AccountController.php.rej
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
Hunk #2 FAILED at 264.
1 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php.rej
patching file app/code/core/Mage/Downloadable/controllers/CustomerController.php
patching file app/code/core/Mage/ImportExport/Model/Export/Adapter/Abstract.php
patching file app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php
Hunk #2 FAILED at 118.
Hunk #3 succeeded at 121 (offset -12 lines).
1 out of 3 hunks FAILED -- saving rejects to file app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php.rej
patching file app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php
patching file app/code/core/Mage/ImportExport/etc/config.xml
patching file app/code/core/Mage/ImportExport/etc/system.xml
patching file app/code/core/Mage/Newsletter/Model/Observer.php
patching file app/code/core/Mage/Newsletter/Model/Queue.php
patching file app/code/core/Mage/Page/etc/system.xml
patching file app/code/core/Mage/Paypal/controllers/PayflowController.php
patching file app/code/core/Mage/Paypal/controllers/PayflowadvancedController.php
patching file app/code/core/Mage/Paypal/etc/config.xml
patching file app/code/core/Mage/Persistent/etc/config.xml
patching file app/code/core/Mage/Review/controllers/ProductController.php
patching file app/code/core/Mage/Rss/Block/Catalog/Salesrule.php
patching file app/code/core/Mage/Sales/Helper/Guest.php
patching file app/code/core/Mage/Sales/Model/Quote/Address.php
patching file app/code/core/Mage/Sales/Model/Quote/Item.php
can't find file to patch at input line 2268
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/code/core/Zend/Xml/Security.php app/code/core/Zend/Xml/Security.php
|index a3cdbc8..8b697b9 100644
|--- app/code/core/Zend/Xml/Security.php
|+++ app/code/core/Zend/Xml/Security.php
--------------------------
File to patch:
Skip this patch? [y]
Skipping patch.
3 out of 3 hunks ignored
patching file app/design/adminhtml/default/default/template/authorizenet/directpost/iframe.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/creditmemo/create/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/creditmemo/view/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/invoice/create/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/invoice/view/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/order/view/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/shipment/create/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/shipment/view/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/file.phtml
patching file app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/creditmemo/name.phtml
patching file app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/invoice/name.phtml
patching file app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/name.phtml
patching file app/design/adminhtml/default/default/template/sales/items/column/name.phtml
patching file app/design/adminhtml/default/default/template/sales/items/renderer/default.phtml
patching file app/design/adminhtml/default/default/template/sales/order/totals/discount.phtml
patching file app/design/adminhtml/default/default/template/sales/order/view/info.phtml
patching file app/design/frontend/base/default/template/catalog/product/view/options/type/file.phtml
patching file app/design/frontend/base/default/template/rss/order/details.phtml
patching file lib/Varien/File/Uploader.php
patching file lib/Varien/Io/File.php
Hunk #1 FAILED at 227.
1 out of 1 hunk FAILED -- saving rejects to file lib/Varien/Io/File.php.rej

Has this install done anything at all? What do I do to fix the errors? I'm new at this, any help would be greatly appreciated. Thanks

Tags (2)
12 REPLIES

Re: magento 1.6.2.0 SUPEE-7405 failing

Hi @helefa

 

You should check all the file named as  .rej like 

app/code/core/Mage/Core/Model/Email/Template/Filter.php.rej

open the file and check the information in these files. 

 

Your magento instance might have core files modifications. Compare app/code/core/Mage/Core/Model/Email/Template/Filter.php  with the default files of  Magento version which you are using. This information may help you, for rest of the files open the files and compare theses file with the information given in the patch.

 

Like check app/code/core/Mage/Admin/Model/Observer.php

 

- $requestedActionName = $request->getActionName();       // This code line should be replaced with next line

+ $requestedActionName = strtolower($request->getActionName());  // Replacement code line

 

This will confirm for you that rest of the files are affected or not.

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: magento 1.6.2.0 SUPEE-7405 failing

Hunk failures occur because the data comparison between what the patch file expects to find in the file to be patched does not match what the patch file knows is supposed to be there.

 

Therefore hunk failures happen due to several reasons.

 

1. The file it is trying to patch has been modified by somebody and is not original

 

2. The file was uploaded and the SFTP client did not translate line endings properly or somehow a space/lf got added to the file

 

3. Previous patches were not installed and the modified contents are not found so the patch file doesn't find what it expects.

 

Start with assuming 3 is the issue, download app/etc/applied.patches.list and find out what security patches HAVE NOT BEEN INSTALLED.   ===> INSTALL THEM

 

Typically what is being found is that issues with

app/code/core/Zend/Xml/Security.php

are an indicator that either SUPE-6788 was not installed, or suffered a mishap during installation that either missed modifying this file or mangled its contents.

 

If you are still having the problem, 1 & 2 may be the issue, go download the installer archive for your exact version of Magento, save a copy of the file that will not patch and upload the fresh, unmodified version to see if the patch will run.

 

Re: magento 1.6.2.0 SUPEE-7405 failing

I have the same problem on a magento 1.6.0.0.

 

I first think than my core file was modified, so I dowloaded magento 1.6.0.0 to compare the files, and nothing... I tried to apply the path on this new archive, without success. Here are the errors

 

$ unzip magento-1.6.0.0-2015-02-12-06-29-29.zip 
$ cp PATCH_SUPEE-7405_CE_1.6.0.0_v1-2016-01-20-06-30-35.sh magento
$ cd magento
$ sh PATCH_SUPEE-7405_CE_1.6.0.0_v1-2016-01-20-06-30-35.sh 
Checking if patch can be applied/reverted successfully...
-e ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Admin/Model/Observer.php
Hunk #1 FAILED at 33.
Hunk #2 FAILED at 82.
2 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Admin/Model/Observer.php.rej
patching file app/code/core/Mage/Admin/Model/Redirectpolicy.php
patching file app/code/core/Mage/Admin/Model/Resource/User.php
patching file app/code/core/Mage/Admin/Model/Session.php
patching file app/code/core/Mage/Admin/Model/User.php
patching file app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php
patching file app/code/core/Mage/Adminhtml/Block/Widget/Grid.php
patching file app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php
patching file app/code/core/Mage/Adminhtml/Helper/Sales.php
patching file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php
patching file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php
patching file app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php
patching file app/code/core/Mage/Adminhtml/controllers/IndexController.php
patching file app/code/core/Mage/Authorizenet/Helper/Admin.php
patching file app/code/core/Mage/Authorizenet/Helper/Data.php
patching file app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php
patching file app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php
patching file app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php
patching file app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Image.php
patching file app/code/core/Mage/CatalogIndex/etc/config.xml
patching file app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php
patching file app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php
patching file app/code/core/Mage/Checkout/controllers/CartController.php
patching file app/code/core/Mage/Checkout/controllers/OnepageController.php
patching file app/code/core/Mage/Core/Controller/Response/Http.php
patching file app/code/core/Mage/Core/Helper/Data.php
patching file app/code/core/Mage/Core/Model/App.php
patching file app/code/core/Mage/Core/Model/Config.php
patching file app/code/core/Mage/Core/Model/Email/Template/Filter.php
Hunk #1 FAILED at 166.
Hunk #2 succeeded at 180 (offset -10 lines).
1 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Core/Model/Email/Template/Filter.php.rej
patching file app/code/core/Mage/Core/Model/Factory.php
patching file app/code/core/Mage/Core/Model/File/Validator/Image.php
patching file app/code/core/Mage/Core/Model/Input/Filter/MaliciousCode.php
patching file app/code/core/Mage/Core/Model/Session.php
patching file app/code/core/Mage/Customer/controllers/AccountController.php
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
Hunk #2 FAILED at 264.
1 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php.rej
patching file app/code/core/Mage/Downloadable/controllers/CustomerController.php
patching file app/code/core/Mage/ImportExport/Model/Export/Adapter/Abstract.php
patching file app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php
Hunk #2 FAILED at 118.
Hunk #3 succeeded at 117 (offset -12 lines).
1 out of 3 hunks FAILED -- saving rejects to file app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php.rej
patching file app/code/core/Mage/ImportExport/Model/Import/Entity/Abstract.php
patching file app/code/core/Mage/ImportExport/etc/config.xml
patching file app/code/core/Mage/ImportExport/etc/system.xml
patching file app/code/core/Mage/Newsletter/Model/Observer.php
patching file app/code/core/Mage/Newsletter/Model/Queue.php
patching file app/code/core/Mage/Page/etc/system.xml
patching file app/code/core/Mage/Paypal/controllers/PayflowController.php
patching file app/code/core/Mage/Paypal/etc/config.xml
patching file app/code/core/Mage/Persistent/etc/config.xml
patching file app/code/core/Mage/Review/controllers/ProductController.php
patching file app/code/core/Mage/Rss/Block/Catalog/Salesrule.php
patching file app/code/core/Mage/Sales/Helper/Guest.php
patching file app/code/core/Mage/Sales/Model/Quote/Address.php
patching file app/code/core/Mage/Sales/Model/Quote/Item.php
can't find file to patch at input line 2240
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git app/code/core/Zend/Xml/Security.php app/code/core/Zend/Xml/Security.php
|index a3cdbc8..8b697b9 100644
|--- app/code/core/Zend/Xml/Security.php
|+++ app/code/core/Zend/Xml/Security.php
--------------------------
File to patch: 
Skip this patch? [y] 
Skipping patch.
3 out of 3 hunks ignored
patching file app/design/adminhtml/default/default/template/authorizenet/directpost/iframe.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/creditmemo/create/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/creditmemo/view/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/invoice/create/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/invoice/view/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/order/view/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/shipment/create/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/bundle/sales/shipment/view/items/renderer.phtml
patching file app/design/adminhtml/default/default/template/catalog/product/composite/fieldset/options/type/file.phtml
patching file app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/creditmemo/name.phtml
patching file app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/invoice/name.phtml
patching file app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/name.phtml
patching file app/design/adminhtml/default/default/template/sales/items/column/name.phtml
patching file app/design/adminhtml/default/default/template/sales/items/renderer/default.phtml
patching file app/design/adminhtml/default/default/template/sales/order/totals/discount.phtml
patching file app/design/adminhtml/default/default/template/sales/order/view/info.phtml
patching file app/design/frontend/base/default/template/catalog/product/view/options/type/file.phtml
patching file app/design/frontend/base/default/template/rss/order/details.phtml
Hunk #1 succeeded at 77 (offset -1 lines).
patching file lib/Varien/File/Uploader.php
patching file lib/Varien/Io/File.php
Hunk #1 FAILED at 227.
1 out of 1 hunk FAILED -- saving rejects to file lib/Varien/Io/File.php.rej
 $ find . -name '*.rej'

There is not .rej file to examine.

 

Can someone tell me if I do something wrong ? It seems that the patches for 1.6.x versions are weird...

Re: magento 1.6.2.0 SUPEE-7405 failing

Probably neither SUPEE-5998 or SUPEE-6788 have been applied, or did not apply properly.

 

The failing items were patched in SUPEE-5998 and SUPEE-6788 and if their changes are not present, then SUPEE-7405 will not apply. Check your app/etc/applied.patches.list to find out all the previous patches that were not installed and install them in the order released to bring your system up to date so that SUPEE-7405 may be installed.

 

Successful application entries from applied.patches.list for the files that are failing on your SUPEE-7405 installation attempt

 

2015-05-25 05:15:43 UTC | SUPEE-5998 | EE_1.14.1.0 | v1 | 9324d922a64fac99ceb3725062eb498d634401dc | Thu May 14 13:46:45 2015 +0300 | v1.14.1.0..HEAD
patching file app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
patching file app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php
patching file lib/Varien/Io/File.php


2015-11-04 06:48:40 UTC | SUPEE-6788 | CE_1.6.2.0 | v1 | ba4ae17ba0ef0baf204e2d616a428713d29e7968 | Tue Oct 27 13:15:35 2015 +0200 | baba978
patching file app/code/core/Mage/Core/Model/Email/Template/Filter.php
patching file app/code/core/Mage/Customer/controllers/AccountController.php
patching file app/code/core/Zend/Xml/Security.php

 

 

Re: magento 1.6.2.0 SUPEE-7405 failing

You're right @chiefair neither SUPEE-5998 and SUPEE-6788 are listed in the applied.patches.list file.

 

I downloaded the SUPEE-6788, but I can't found the SUPEE-5998 on the "release archive" of the download page. Do you know where I can get it ?

Re: magento 1.6.2.0 SUPEE-7405 failing

In the perverse nature of some of these patches, the internal number that was being noted in the applied.patches.list would not match up with the actual official release number.

 

For example, when I applied it, it was reporting itself as SUPEE-5998 | EE_1.14.1.0 | v1

 

The current version is reporting itself as SUPEE-5994 | CE_1.6.0.0 | v1

 

I just diffed the original I used and the currently downloadable SUPEE-5994 which has been updated to properly note itself as itself. You are looking for:

 

SUPEE-5994 - This patch addresses multiple security vulnerabilities in Magento Community Edition software, including issues that can put customer information at

Re: magento 1.6.2.0 SUPEE-7405 failing

Thanks for your help. I patched with success.

Re: magento 1.6.2.0 SUPEE-7405 failing

Last point about this security patch, if your server is running Php under 5.4, you'll have a problem due to the usage of array short syntax.

 

If you can't upgrade PHP to 5.4, consider to update the file app/code/core/Mage/Adminhtml/Helper/Sales.php but be aware that you could have problems applying future patches

 

$ git diff app/code/core/Mage/Adminhtml/Helper/Sales.php
diff --git a/magento/app/code/core/Mage/Adminhtml/Helper/Sales.php b/magento/app/code/core/Mage/Adminhtml/Helper/Sales.php
index a222234..53f145f 100644
--- a/magento/app/code/core/Mage/Adminhtml/Helper/Sales.php
+++ b/magento/app/code/core/Mage/Adminhtml/Helper/Sales.php
@@ -121,7 +121,7 @@ class Mage_Adminhtml_Helper_Sales extends Mage_Core_Helper_Abstract
     public function escapeHtmlWithLinks($data, $allowedTags = null)
     {
         if (!empty($data) && is_array($allowedTags) && in_array('a', $allowedTags)) {
-            $links = [];
+            $links = array();
             $i = 1;
             $regexp = "/<a\s[^>]*href\s*?=\s*?([\"\']??)([^\" >]*?)\\1[^>]*>(.*)<\/a>/siU";
             while (preg_match($regexp, $data, $matches)) {

Re: magento 1.6.2.0 SUPEE-7405 failing

Also, when you upgrade to PHP 5.4, make sure you install the PHP 5.4 compatibility patch that is available for Magento 1.6.x.x and up if you haven't already applied it.