1

I was trying to apply SUPEE-5344 patch to Magento but getting following error. I don't understand. Is the patch already there ? If yes then why does Magento gives messages to apply the patches

Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Admin/Model/Observer.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
3 out of 3 hunks ignored -- saving rejects to file app/code/core/Mage/Admin/Model/Observer.php.rej
patching file app/code/core/Mage/Core/Controller/Request/Http.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file app/code/core/Mage/Core/Controller/Request/Http.php.rej
patching file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizeController.php.rej
patching file app/code/core/Mage/XmlConnect/Model/Observer.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
2 out of 2 hunks ignored -- saving rejects to file app/code/core/Mage/XmlConnect/Model/Observer.php.rej
patching file lib/Varien/Db/Adapter/Pdo/Mysql.php
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file lib/Varien/Db/Adapter/Pdo/Mysql.php.rej
2
  • First thing, to check that if Magento has all the patches installed or not, go and test your website here : magereport.com. If any patches are not installed, you will need to install those by following the process as Magento recommands through SSH commands. The hunk error you are getting is because patch files has coded with the specific line numbers to be changed in your current Magento files, if patch don't find the code at defined line, it will show hunk error. The solution of that, either you can get the same file from the git and upload it to your server and then patch. Or yo Commented Oct 3, 2015 at 7:26
  • It's all hunk errors which probably indicates that Magento was installed by using an FTP solution that didn't properly translate the line endings from DOS CRLF to *nix LF. DOS2UNIX is a utility used to correct this issue. magento.stackexchange.com/a/74091/553 Commented Oct 4, 2015 at 2:43

1 Answer 1

1

I managed to solve this problem by:

  1. first download all those concerning files (in my case 4 files listed in my question) from the original Magento download page. In my case this was version ver 1.9.1.0.
  2. overwriting all those concerning files on my server (where my Magento installation is hosted), with the original Magento 1.9.1.0 package files.
  3. re-apply the patch!

Then the patch will be applied successfully!

1
  • I would agree with this approach for certain patches, but what about files that have been previously patched by another patch? This would mean that you would need to re-apply two patches, but if it's only for a set of files you would have to manually apply the previous before applying the current one you want Commented Apr 27, 2016 at 14:20

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.