1

SUPEE-7405 produces errors when applied to Mag 1.9.1.1.

app/etc/applied.patches.list displayed installed patches are:

SUPEE-5998 | EE_1.14.1.0 | v1
SUPEE-6237 | EE_1.14.2.0 | v1
SUPEE-6285 | CE_1.9.1.1 | v1
SUPEE-6285 | CE_1.9.1.1 | v1 (REVERTED)
SUPEE-6285 | CE_1.9.1.1 | v2
SUPEE-6482 | CE_1.9.2.0 | v1
SUPEE-6788 | CE_1.9.1.1 | v1
SUPEE-7616 | CE_1.9.2.2-CE_1.8.0.0 | v1

After installing SUPEE-7405 the following errors are displayed:

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/Core/Model/Email/Queue.php
patching file app/code/core/Mage/Core/Model/Email/Template/Filter.php
Hunk #1 FAILED at 171.
Hunk #2 succeeded at 194 (offset 2 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/File/Validator/Image.php
...
patching file lib/Varien/Io/File.php

At around line 171, I had added $block = false; under Retrieve Block html directive section of Filter.php, since I was getting ERR (3): Notice: Undefined variable: block in the system.log file. The error went away. The suggestion came from this post.

So I removed the above fix. ($block = false;), and tried to apply SUPEE-7405 again. It now produced the following error:


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/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/Captcha/etc/config.xml
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/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/Queue.php
patching file app/code/core/Mage/Core/Model/Email/Template/Filter.php
Hunk #1 FAILED at 171.
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/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
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
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/Rss/Helper/Order.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
patching file app/code/core/Zend/Xml/Security.php
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


So at this time I went a head using winMerge compared the original Filter.php from magento-1.9.1.1-2015-04-30-12-49-08.zip to my Filter.php file. I found the following differences.
p.s. I have not added any of the following!.

enter image description here

enter image description here

enter image description here

At this point I do not know how to apply the new SUPEE-7405 to the site?

1
  • Would be great if you accept the answer to help others in future. Commented Mar 10, 2016 at 0:15

1 Answer 1

2

I think your core file is changed as you have already mentioned above. I would just replace those files with fresh magento file to make sure everything is ok.

Look for these files:

  1. app/code/core/Mage/Core/Model/Email/Template/Filter.php
  2. app/code/core/Mage/Admin/Model/Observer.php
  3. app/code/core/Mage/Admin/Model/Redirectpolicy.php

And take backup of these files in your local computer, then get fresh files from magento and replace in your server, then apply the patches.

After you finish, you would like to check what has been applied and change according to your backup file.

OR

Just replace those backed up files after applying patches and then apply patch manually to these files only.

Follow this discussion: Security Patch SUPEE-7405 - possible problems?

Check this too: Applying patch throws an error, but no .rej file created

UPDATE

Thanks to @rob3000 for pointing blank space in the core file, I did mentioned above that replace the file with fresh one to be in safe side.

7
  • I will do that. But first, files patching file app/code/core/Mage/Admin/Model/Observer.php and patching file app/code/core/Mage/Admin/Model/Redirectpolicy.php seemed to have patched correctly, as there were no errors indicated! Is there an error that I am not seeing? Commented Feb 10, 2016 at 0:03
  • Just to be safe side, you can replace the file, but yes, you can check/compare the file to see if there is any difference. If no diff then it should be fine. Commented Feb 10, 2016 at 0:10
  • I just added the entire error to the question for your reference. I will do that and will keep you posted. Thanks. Commented Feb 10, 2016 at 0:15
  • 2
    Are you able to look at the patch you downloaded and see the lines where its trying to patch for the filter.php? It could be a whitespace issue that it can't find the correct lines to change. Also are you sure you downloaded the right patch for your version?
    – rob3000
    Commented Feb 10, 2016 at 3:54
  • 1
    Thanks to @rob3000 for pointing blank space in the core file, I did mentioned above that replace the file with fresh one to be in safe side. Glad, you applied the patch successfully. Commented Mar 16, 2016 at 0:45

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