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

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 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 (

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).


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
    – scrowler
    Commented Nov 7, 2015 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.
    – scrowler
    Commented Nov 7, 2015 at 3:20
  • The function is _validateControllerInstance($controllerInstance)
    – Eric
    Commented Nov 9, 2015 at 14:46

3 Answers 3


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


Issues fixed by this patch

  • Looking at my applied.patches.list file, I patched SUPEE-5994.
    – Eric
    Commented Nov 9, 2015 at 14:40
  • I pulled down a new instance of magento 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
    Commented Nov 9, 2015 at 15:17

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, 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.

  • 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
    Commented Nov 6, 2015 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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