Question

There is an issue with the current patch (SUPEE-6788) for Magento 1.8.1.0.

When I try to apply the patch I get the error of:

patching file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
Hunk #1 FAILED at 131.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php.rej

When I pulled down a clean version of 1.8.1.0 and did a diff, there was no difference.

I then looked into the patch file and saw it was expecting another function below line 131.

I found that function is in later versions (1.9.2.0+).

I just added that function to the app/code/core/Mage/Core/Controller/Varien/Router/Admin.php file, and re-ran the patch and everything worked.

Is that an okay work-around? That function will never be called but I am not sure if this will cause issues later on (like future patches).

EDIT

According to my applied.patches.list file I applied the following patches: SUPEE-5344, SUPEE-1533, SUPEE-5994, SUPEE-6285, and SUPEE-6482

Was it helpful?

Solution

When any one or more files fail to patch, the whole patch fails. Adding the missing function to the file in question will allow SUPEE-6788 to apply but you're probably missing SUPEE-5994, or had it mess up on application. I would check to see if it is listed in your app/etc/applied.patches.list file.

I would then pick a sample of the files patched (see list below), check their file dates and then compare to see if the changes in the patch had been applied, otherwise your Magento installation has a gaping hole in it still.

Files patched by SUPEE-5994 were as follows on 1.6.0.0-1.9.1.1

app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php
app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
app/code/core/Mage/Core/Controller/Varien/Router/Standard.php
app/code/core/Mage/Customer/Model/Customer.php
app/code/core/Mage/Dataflow/Model/Convert/Parser/Csv.php
app/code/core/Mage/ImportExport/Model/Export/Adapter/Csv.php
app/code/core/Mage/Install/Controller/Router/Install.php
app/code/core/Mage/Install/etc/config.xml
app/code/core/Mage/Sales/controllers/Recurring/ProfileController.php
downloader/Maged/Model/Connect.php
downloader/Maged/View.php
downloader/template/connect/packages_prepare.phtml
downloader/template/messages.phtml
get.php
lib/PEAR/PEAR/PEAR.php
lib/PEAR/PEAR/PEAR5.php
lib/Varien/Io/File.php

Issues fixed by this patch

OTHER TIPS

I think you might be missing a previous patch. Check app/etc/applied.patches.list and make sure you have all previous patches applied.

Magento supee 6788 on 1.9.1.1, error applying patch

It would seem that you may have downloaded the incorrect patch. However I see nothing wrong with your fix. As far as problems in the future I don't foresee any.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top