Apologies in advance for yet another of these threads -- but after reading through every 7405 thread I can find I'm no closer to a solution. This has been a struggle for weeks now and I'd really like to get it resolved. Fingers crossed! :/
I've followed this guide for installing SUPEE-7405 1.0, and 1.1, without ssh:
https://magecomp.com/blog/how-to-install-supee-7405-with-or-without-ssh/
I followed these steps:
- downloaded and extracted both versions of the security patch
- made a backup of the magento files from the server
- overwrote the server files with the patch files (1.0)
At this point,
- attempting to log in to Magento's back-end/Admin control panel results in an HTTP500 error
- and some of the products (catalog entries) on the site's homepage disappear -- like they've been deleted (though I can't confirm this since I can't log in as admin now).
To undo this,
- I paste my backed up files over the folders on the server, reverting the patch install.
- This gets me back to a functioning site, but no closer to the security patch actually working.
About PHP...
- I saw the PHP version mentioned in a bunch of threads about SUPEE-7405, and ours was outdated.
- We have already upgraded to 5.6, in an attempt to resolve this install, so this should not be an issue now.
That's where I'm at now.
Open to any/all ideas -- would really like to get the patch installed and functional, but every time I paste its files onto the server, we (1) lose access to the site's back-end entirely, and (2) the site's database seems to break (products disappear).
Thanks in advance!
Hi @WellsDan
Always use the patch from Magento official site. Don't you have access to ssh for your site?
If no and if you use windows system for development then you can use GitBash to apply the patches.
Did you see any errors in your Magento system.log and exception.log files? There were issues for the php5.3 version but version with php 5.4 + are ok to install the SUPEE-7405 patch. (Note: php 5.6 is not officially supported by Magento fro Magento1x)
You may also visit following url for more information Security Patch SUPEE-7405 - possible problems?
Thanks for your reply @Mukesh Tiwari,
I'm in Windows, but I've downloaded GitBash at your recommendation -- I'm going to try SSH as you've advised.
I'm having issues accessing the server so am troubleshooting; will report back here whether my problem's solved once I've been able to gain access.
Thanks again!
Hi again @Mukesh Tiwari,
I've now got access to the server and have attempted to deploy the patch through SSH.
The error message I'm getting is that several files already exist, so the patch is being skipped.
[user@domain public_html]$ sh SUPEE-7405.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/Observer.php The next patch would create the file app/code/core/Mage/Admin/Model/Redirectpolicy.php, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored 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 The next patch would create the file app/code/core/Mage/Authorizenet/Helper/Admin.php, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored 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/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. 1 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Core/Model/Email/Template/Filter.php.rej The next patch would create the file app/code/core/Mage/Core/Model/Factory.php, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored The next patch would create the file app/code/core/Mage/Core/Model/File/Validator/Image.php, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored 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 The next patch would create the file app/code/core/Mage/ImportExport/etc/system.xml, which already exists! Assume -R? [n] Apply anyway? [n] Skipping patch. 1 out of 1 hunk ignored 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 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
Is there a way to force the patch to overwrite existing files, instead of skipping the install?
Thanks!
Hi @WellsDan
Try to compare the files which were skipped with the code from patch file. If the code changes are there then it should be ok.
I did not find any command to force apply the patch (How to Apply and Revert Magento Patches).
When you tried to apply patch last time and reverted back some files might have been there.(Affected with patch)
Like for the app/code/core/Mage/Admin/Model/Redirectpolicy.php file there should be following changes
if (empty($request)) { return; } - $countRequiredParams = $this->_urlModel->useSecretKey() ? 1 : 0; + $countRequiredParams = ($this->_urlModel->useSecretKey() + && $request->getParam(Mage_Adminhtml_Model_Url::SECRET_KEY_PARAM_NAME)) ? 1 : 0; $countGetParams = count($request->getUserParams()) + count($request->getQuery()); return ($countGetParams > $countRequiredParams) ?
lines preceding with - should be replaced with line preceding +
Hi @Mukesh Tiwari,
That was helpful, but I'm still unable to patch for some reason.
I've been able to eliminate the "already exists!" problem, but now I'm getting a failed HUNK issue.
sh SUPEE-7405.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/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/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/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 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/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
Hunk #2 seems fine, but Hunk #1 keeps failing.
- I have backed up Filter.php
- I have tried replacing Filter.php with the original version, from the Mirror for 1.7.0.2 (didn't work, so I restored my backup)
- I have tried deleting Filter.php (didn't work, so I restored my backup)
- The file Filter.php.rej is not being created in the folder -- the ssh log says it's there, but I can't see it...
- The file applied.patches.list is not in my app/etc folder, so I'm unable to confirm if there's a patch missing. As far as I'm aware, all previous patches have been applied, and MageReport.com shows that only SUPEE-7405 is missing.
Have you got any more ideas based on the log above?
Thanks again - you've been a big help ><
Hi @WellsDan
Are you sure that previously you applied the SUPEE-6788 patch? As that patch also affected the Filter.php file.
Can you update the question with the code at line number 166 and 177 of app/code/core/Mage/Core/Model/Email/Template/Filter.php file.
Reverting this file with the Magento 1.7.0.2 will not work because SUPEE-6788 was released after Magento 1.7.0.2 and before SUPEE-7405 so that file should be affected by SUPEE-6788 then only SUPEE-7405 will work properly for you.
Hi @Mukesh Tiwari,
Magereport.com shows SUPEE-6788 as being installed already.
Line 166 of Filter.php:
$skipParams = array('type', 'id', 'output');
Line 177 of Filter.php:
if ($block) {
Thanks for your continued support! ><
Hi @WellsDan
Can you try to reapply the SUPEE-7405 patch? The code in the lines which you mentioned is correct after installing the 6788 patch.Once the 7405 patch is installed file should be like following.
Use following command to remove the current patch (7405)
sh patch-file-name.sh -R
Then try to reapply it.
Hi @muk_t,
Using the command line sh patch-file-name.sh –R generated a different error (unreversed patch detected).
Attempting to install SUPEE-7405 again still has an error with line 166 of Filter.php, since I wasn't able to revert.
Error from attempting to revert 7405:
https://www.dropbox.com/s/60kr1650b5br4n6/Log.txt?dl=0 (It's too long to include in this post)