I am trying to patch a Magento with the


I have solved several line ending problems and missing .htaccess.sample ...

But these file cannot be patched:

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     

patching file lib/Varien/Data/Collection/Db.php
Hunk #1 FAILED at 410.
Hunk #2 FAILED at 474.
2 out of 2 hunks FAILED -- saving rejects to file     

I downloaded a fresh Magento copy (from
https://www.magentocommerce.com/download) and tried to apply the patch on it but also failed.

Checked the lines mentioned on CLI (like FAILED at 131) but I did not found anything suspicious.

Also it did not write any .rej files

Any advise ?


1 Answer 1


You must apply the previous patches first.

lib/Varien/Data/Collection/Db.php has been modified by patch SUPEE-5344 already, and app/code/core/Mage/Core/Controller/Varien/Router/Admin.php by SUPEE-5994.

A fresh copy does not contain any of the patches, so you need to apply all that have been released afterwards in order

You can look up the necessary patches for each version in this matrix (select the Magento CE sheet!).

Patches for Magento CE

  1. APPSEC-212
  2. SUPEE-1533
  3. SUPEE-5344
  4. SUPEE-5994
  5. SUPEE-6285
  6. SUPEE-6482
  7. SUPEE-6788

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.