cancel
Showing results for 
Search instead for 
Did you mean: 

CE 1.5.1.0 issue with SUPEE-10266

CE 1.5.1.0 issue with SUPEE-10266

I ran into an issue while patching SUPEE-10266 on Magento CE 1.5.1.0 a while ago, unfortunately I haven't been able to find a workaround yet.

 

It seems there is an issue with CartController.php from Magento core. I have tried overwriting this file with a clean copy directly from the Magento core bundle for 1.5.1.0 prior to applying the patch, but it didn't solve the problem either. The error is still persistent.

 

Has anybody else had this issue? Is there a known solution for this?

 

Here's the output from the patch file (I used PATCH_SUPEE-10266_CE_1.5.1.0_v1-2017-09-13-06-22-59.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/Session.php

patching file app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php

patching file app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Notice.php

patching file app/code/core/Mage/Adminhtml/Block/Notification/Window.php

patching file app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php

patching file app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Options.php

patching file app/code/core/Mage/Adminhtml/Controller/Action.php

patching file app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php

patching file app/code/core/Mage/Adminhtml/controllers/CustomerController.php

patching file app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php

patching file app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php

patching file app/code/core/Mage/Checkout/controllers/CartController.php

Hunk #1 FAILED at 236.

Hunk #2 succeeded at 504 (offset -28 lines).

1 out of 2 hunks FAILED -- saving rejects to file app/code/core/Mage/Checkout/controllers/CartController.php.rej

patching file app/code/core/Mage/Core/Model/File/Validator/Image.php

patching file app/code/core/Mage/Core/etc/config.xml

patching file app/code/core/Mage/Rss/Helper/Data.php

patching file app/code/core/Mage/Sales/Model/Mysql4/Order/Item/Collection.php

patching file app/code/core/Zend/Serializer/Adapter/PhpCode.php

patching file app/design/adminhtml/default/default/template/catalog/product/edit/options/type/file.phtml

patching file app/design/adminhtml/default/default/template/customer/tab/view.phtml

patching file app/design/adminhtml/default/default/template/login.phtml

patching file app/design/adminhtml/default/default/template/notification/toolbar.phtml

patching file app/design/adminhtml/default/default/template/sales/order/view/history.phtml

patching file app/design/adminhtml/default/default/template/sales/order/view/info.phtml

patching file app/design/install/default/default/template/install/create_admin.phtml

patching file app/locale/en_US/Mage_Adminhtml.csv

patching file downloader/template/login.phtml

6 REPLIES 6

Re: CE 1.5.1.0 issue with SUPEE-10266

As per Magento information regarding this path have you installed SUPEE-10348 on top of

10266?

 

Note: SUPEE-10266 for Magento Commerce (Enterprise Edition) includes a fix for a functional issues MPERF-9685, related to checkout with a zero order amount. This fix is not included in release 1.14.3.6. However, in some cases, SUPEE-10266 can cause issues in the checkout process. Specifically, if a customer enables the Add gift options checkbox during checkout, the checkout process will not progress beyond the payments step. Magento released a fix for this issue as a new patch SUPEE-10348, that needs to be installed on top of SUPEE-10266. 

 

Problem solved? Click Kudos & Accept as Solution!

Re: CE 1.5.1.0 issue with SUPEE-10266

Thanks for your reply.

 

The fix you mentioned only applies to Magento EE, however we are using Magento CE. Also, since installation of patch 10266 is not possible due to the error mentioned above, there's no way for us to install another patch on top.


We would need to fix installation of patch 10266 first, which is what we are looking into primarily. Any other suggestions are more than welcome!

Re: CE 1.5.1.0 issue with SUPEE-10266

In your cart controller do you have these lines?

1.

if (!is_array($orderItemIds) || !$this->_validateFormKey()) {

 

 

2. -

-        /* @var $itemsCollection Mage_Sales_Model_Mysql4_Order_Item_Collection */
         $cart = $this->_getCart();
         foreach ($itemsCollection as $item) {
             try {

$this->_goBack();
}

Apart from this may I know what is written in your cartConrtoller file at line 236

 

Also if you able to manually check the files where the hunk fails and compare with what the patch is expecting to find. You should be able to find why the patch hasn't been applied.

 

If it's only a small change, then you may be able to manually correct before applying the patch again

 

Problem solved? Click Kudos & Accept as Solution!

Re: CE 1.5.1.0 issue with SUPEE-10266

Thanks for your input!

 

I do not have the exact same lines that you posted, so I have copied the relevant parts from my file below to demonstrate the differences:

 

1. It seems I'm missing the validateFormKey() part here (line 229 in my file) - is there a patch that needs to be applied before installing SUPEE-10266 for this to work?

 

if (is_array($orderItemIds)) {

 

2. The foreach loop actually starts in line 236 in my CartController.php file, which is where the patch fails. It seems it expects the addgroupAction() method to start there, but my file is missing some lines above. Maybe I'm actually missing a previous patch, would you know anything about this? 

 

/* @var $itemsCollection Mage_Sales_Model_Mysql4_Order_Item_Collection */
$cart = $this->_getCart();
foreach ($itemsCollection as $item) {
    try {
        $cart->addOrderItem($item, 1);
    }

As I said, I have also tried to overwrite my CartController.php with a clean copy from Magento 1.5.1.0 core files, but the result was the same.

Re: CE 1.5.1.0 issue with SUPEE-10266

I don't think to put clean copy from Magento 1.5.1.0 core files will help you here as 1.5.1.0 is very old version and after that many patches released. So the code SUPEE 10266 is definitely will not be there   

 

May I know the list of patches you have applied already, you can check in app/etc/applied.patches files

As such, there are no dependencies written on Magento blog, but it's always better to install all the previous patches before applying any new patch i.e:

 

SUPPE 9767

SUPPE 9652

SUPEE 8788

 

So you can install these patches if not installed yet and then try to install 10266. 

 

 

 

Re: CE 1.5.1.0 issue with SUPEE-10266

This is so strange, I replied to you weeks ago but it seems like my answer was deleted ... Very annoying. Hope it works this time. :/

 

Here's a list of all patches currently applied to our 1.5.1.0 Magento shop, with patch version info added where possible:

 

SUPEE-1533
SUPEE-5344
SUPEE-5994
SUPEE-6285
SUPEE-6482 v1
SUPEE-6788 v1
SUPEE-7405 v1
SUPEE-7405 v1.1
SUPEE-9652 v1
SUPEE-8167 v1
SUPEE-9767
SUPEE-10570 v1

 

So the only patch missing from your list would be SUPEE-8788, which is a total nightmare to install on older Magento versions all by itself.

 

On the offical DevDocs (hxxps://devdocs.magento.com/guides/m1x/other/ht_install-patches.html#apply-8788) it states:

 

If you haven't applied SUPEE-8788, revert SUPEE-1533 (version restrictions apply), apply SUPEE-3941 (version restrictions apply), then apply SUPEE-8788.

 

Reverting SUPEE-1533 is not an issue. But installing SUPEE-3941 never worked for me, and I think it's because this patch was never officially released for Magento 1.5.x (only for versions 1.8.x and above).

 

I have tried different workarounds mentioned here:

 

hxxps://community.magento.com/t5/Magento-1-x-Security-Patches/SUPEE-8788-AND-SUPEE-1533-Incompatible-Hunk-error/td-p/50434

 

Unfortunately none of them worked. Apparently, for Magento 1.6.2.x a different version of this patch can be applied (namely SUPEE-3941_EE_1.11.2.0_v1 instead of the official SUPEE-3941_EE_1.14.0.1_v1), but this didn't work for our 1.5.1.0 installation either.

 

This is all very frustrating, because Magento never officially released a proper version for SUPEE-3941 on Magento 1.5.x, which causes all kinds of trouble. Keep in mind that 1.5.x is still officially supported until June 2020.

 

I'm not even sure that SUPEE-8788 would help with applying SUPEE-10266 anyway, since the before mentioned CartController.php is not touched by SUPEE-8788 (see here: hxxps://magentary.com/kb/install-supee-8788-without-ssh/).

 

I'd really appreciate any other suggestions, since I'm running out of ideas at the moment. So if there's anything left to try you would consider useful, feel free to share.

 

Thanks for your help.