0

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

  • What function was it? There was a previous security patch which touched admin ACLs which you may need to install first. They recommend you install all patches before 6788 – Robbie Averill Nov 7 '15 at 3:14
  • By the way, 1.9.2 includes a whole series of patches bundled with it, which is probably why the function exists in the later version. – Robbie Averill Nov 7 '15 at 3:20
  • The function is _validateControllerInstance($controllerInstance) – Eric Nov 9 '15 at 14:46
1

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

  • Looking at my applied.patches.list file, I patched SUPEE-5994. – Eric Nov 9 '15 at 14:40
  • I pulled down a new instance of magento 1.8.1.0 and applied the patch SUPEE-5994 to it and it added the function to that file. Not sure how that got lost but that seems to be my issue. – Eric Nov 9 '15 at 15:17
0

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

0

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.

  • I did not download the incorrect patch. The patch I used is PATCH_SUPEE-6788_CE_1.8.1.0_v1-2015-10-26-11-59-27.sh – Eric Nov 6 '15 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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