I tried all the steps to install patch SUPEE 6788 but it's giving me the following error

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

patching file .htaccess
can't find file to patch at input line 38
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|diff --git .htaccess.sample .htaccess.sample
|index b8821af..383313a 100644
|--- .htaccess.sample
|+++ .htaccess.sample
File to patch:
Skip this patch? [y]
Skipping patch.
1 out of 1 hunk ignored
patching file app/code/core/Mage/Admin/Model/Block.php
patching file app/code/core/Mage/Admin/Model/Resource/Block.php
patching file app/code/core/Mage/Admin/Model/Resource/Block/Collection.php
patching file app/code/core/Mage/Admin/Model/Resource/Variable.php
patching file app/code/core/Mage/Admin/Model/Resource/Variable/Collection.php
patching file app/code/core/Mage/Admin/Model/Variable.php
patching file app/code/core/Mage/Admin/etc/config.xml
patching file app/code/core/Mage/Admin/sql/admin_setup/upgrade-
patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block.php
patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit.php
patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Edit/Form.php
patching file app/code/core/Mage/Adminhtml/Block/Permissions/Block/Grid.php
patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable.php
patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit.php
patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Edit/Form.php
patching file app/code/core/Mage/Adminhtml/Block/Permissions/Variable/Grid.php
patching file app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php
patching file app/code/core/Mage/Adminhtml/controllers/Permissions/VariableController.php
patching file app/code/core/Mage/Adminhtml/etc/adminhtml.xml
patching file app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php
patching file app/code/core/Mage/Core/Controller/Request/Http.php
Hunk #1 succeeded at 291 (offset -3 lines).
patching file app/code/core/Mage/Core/Controller/Varien/Router/Admin.php
patching file app/code/core/Mage/Core/Helper/UnserializeArray.php
patching file app/code/core/Mage/Core/Model/Email/Template/Filter.php
patching file app/code/core/Mage/Core/Model/Resource/Setup.php
patching file app/code/core/Mage/Core/etc/config.xml
Hunk #1 FAILED at 377.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Core/etc/config.xml.rej
patching file app/code/core/Mage/Core/etc/system.xml
Hunk #1 FAILED at 1110.
1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Core/etc/system.xml.rej
patching file app/code/core/Mage/Customer/Block/Account/Changeforgotten.php
patching file app/code/core/Mage/Customer/Block/Account/Resetpassword.php
patching file app/code/core/Mage/Customer/controllers/AccountController.php
Hunk #3 succeeded at 267 (offset -1 lines).
Hunk #4 succeeded at 304 (offset -1 lines).
Hunk #5 succeeded at 380 (offset -2 lines).
Hunk #6 succeeded at 388 (offset -2 lines).
Hunk #7 succeeded at 755 (offset -3 lines).
Hunk #8 succeeded at 798 (offset -3 lines).
Hunk #9 succeeded at 829 (offset -3 lines).
Hunk #10 succeeded at 839 (offset -3 lines).
Hunk #11 succeeded at 1024 (offset -3 lines).
patching file app/code/core/Mage/Downloadable/Model/Product/Type.php
patching file app/code/core/Mage/Eav/Model/Resource/Attribute/Collection.php
patching file app/code/core/Mage/Sales/Model/Resource/Order/Item/Collection.php
patching file app/code/core/Mage/Sales/controllers/DownloadController.php
patching file app/code/core/Mage/SalesRule/Model/Resource/Coupon/Collection.php
patching file app/code/core/Zend/Soap/Server.php
patching file app/code/core/Zend/Xml/Exception.php
patching file app/code/core/Zend/Xml/Security.php
patching file app/code/core/Zend/XmlRpc/Request.php
patching file app/code/core/Zend/XmlRpc/Response.php
patching file app/design/adminhtml/default/default/layout/admin.xml
patching file app/design/frontend/base/default/layout/customer.xml
patching file app/design/frontend/base/default/template/customer/form/register.phtml
patching file app/design/frontend/base/default/template/customer/form/resetforgottenpassword.phtml
patching file app/design/frontend/base/default/template/page/js/cookie.phtml
patching file app/design/frontend/base/default/template/persistent/customer/form/register.phtml
patching file app/design/frontend/default/iphone/layout/customer.xml
patching file app/design/frontend/default/modern/layout/customer.xml
patching file cron.php
patching file errors/processor.php
patching file lib/Unserialize/Parser.php
patching file lib/Unserialize/Reader/Arr.php
patching file lib/Unserialize/Reader/ArrKey.php
patching file lib/Unserialize/Reader/ArrValue.php
patching file lib/Unserialize/Reader/Bool.php
patching file lib/Unserialize/Reader/Dbl.php
patching file lib/Unserialize/Reader/Int.php
patching file lib/Unserialize/Reader/Str.php
patching file lib/Varien/Data/Collection/Db.php

If anyone has installed patch SUPEE 6788 successfully and also SUPEE

  • Whats your magento version? – Prashant Valanda Mar 3 '16 at 12:36
  • @Rohit my magento version is – kanand304 Mar 3 '16 at 13:16

It looks like you removed the .htaccess file, probably because you run nginx, but this patch includes a change in .htaccess (as well as .htaccess.sample) and fails if the files are not present (see also: Magento patch SUPEE-6788 1 out of 1 hunk ignored missing .htaccess.sample)

To solve this, download your original Magento version and copy the files from there. After the patch was applied successfully you can remove the files again.

  • Now that your post is formatted correctly, I see that it's exactly the same problem as in the linked post. Closing as duplicate. – Fabian Schmengler Mar 3 '16 at 13:09
  • so , I have to download the fresh .htaccess and .htaccess.sample file and upload it by replacing the current .htaccess and .htaccess.sample file and then have to reapply all the patches from the beginning, right? – kanand304 Mar 3 '16 at 13:22
  • yes, but only the patch(es) that failed – Fabian Schmengler Mar 3 '16 at 13:23
  • I replaced my .htaccess and .htaccess.sample and successfully installed SUPEE-6788 but now some of the theme blocks not not visible on homepage. For the custome blocks I have added the permission from here System -> Permission -> Blocks and it is now visible . – kanand304 Mar 4 '16 at 7:12
  • Now tell me what should I do to make the templates default block visible on homepage. – kanand304 Mar 4 '16 at 7:13

Check you have the correct patch for your version, check that previous patches have been applied successfully.

If so have a look at the Patch file for the areas that are failing and compare them to the actual files in your installation.

Have you modified any core files?

  • Below is my app/etc/applied.patches.list 2015-12-29 09:18:19 UTC | SUPEE-5994 | CE_1.6.0.0 | v1 | _ | n/a | SUPEE-5994_CE_1.6.0.0_v1.patch 2015-12-29 09:19:25 UTC | SUPEE-6285 | CE_1.9.1.1 | v2 | 7226d88b1eeb07a5fbc4e62be189a5219457cc14 | Mon Jun 22 16:32:26 2015 +0300 | 202596e441..7226d88b1e 2015-12-29 09:21:04 UTC | SUPEE-6482 | CE_1.9.2.0 | v1 | | Tue Jul 14 14:17:04 2015 +0300 | – kanand304 Mar 3 '16 at 13:12
  • Also, till now I ahve not modified any core files. – kanand304 Mar 3 '16 at 13:13

Before applying any patches it would be better to backup your database as well as all files for safety.

Check first how many patches installed. Patch sequence as below.







->PATCH_SUPEE-7405 ver 1

->PATCH_SUPEE-7405 ver 1.1

You need to apply PATCH_SUPEE-6788 you need to apply all patches before PATCH_SUPEE-6788 which is listed above to solve hunk error easily.

If you have modified your .htaccess file then take backup of the file.

Also you need to change you .htaccess and .htaccess.sample with fresh magento version.(Same version which you have installed on your server)

patching file app/code/core/Mage/Core/etc/config.xml Hunk #1 FAILED at 377. 1 out of 1 hunk FAILED -- saving rejects to file app/code/core/Mage/Core/etc/config.xml.rej

To solve above error you need to follow patch sequence.

You can cross check the error from downloading patch files here . cross check with your file you will see code difference there due to that it triggering hunk error "1 out of 1 hunk FAILED -- saving rejects".

Hope this will helpful to you.

  • I have applied following patches PATCH_SUPEE-1533 ->PATCH_SUPEE-5344 ->PATCH_SUPEE-5994 ->PATCH_SUPEE-6482 After that when i tried to install patches 6788 it gives me error list which is stated above. – kanand304 Mar 3 '16 at 13:04
  • Have you applied PATCH_SUPEE-6285? and have you replace .htaccess.sample – Prashant Valanda Mar 3 '16 at 13:08
  • revert applied patches and start to apply patch from PATCH_SUPEE-1533 and PATCH_SUPEE-5344,PATCH_SUPEE-5994,PATCH_SUPEE-6285,PATCH_SUPEE-6482, PATCH_SUPEE-6788 – Prashant Valanda Mar 3 '16 at 13:22
  • yes SUPEE-6285 is also applied – kanand304 Mar 3 '16 at 13:24

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