Showing results for 
Search instead for 
Did you mean: applying patch 6788 hunk failed


Re: applying patch 6788 hunk failed

If you've restored the stock .htaccess and .htaccess.sample files then check that you've applied all previous security patches--they're a pre-requisite.

Re: applying patch 6788 hunk failed

my magento files are pretty fresh...just downloaded and installed with the last 5-6 days...

Re: applying patch 6788 hunk failed

If you're getting the 207 block error for .htaccess I've got something for you:

So it looks like the .htaccess file from the stock install of some versions ( EE I can confirm the hard way) has a trailing empty line at the end.  However the patch will not run with that there.  Remove the trailing empty line and you may be good to go.    We have a custom .htaccess file and even after I'd copied either the .htaccess.sample or the .htaccess file out of original install it was still causing an error till I tried that.

Patch file:

diff --git .htaccess .htaccess
index 60e1795..aca7f55 100644
--- .htaccess
+++ .htaccess
@@ -207,3 +207,28 @@

#FileETag none

diff --git .htaccess.sample .htaccess.sample
index b8821af..383313a 100644
--- .htaccess.sample
+++ .htaccess.sample
@@ -176,3 +176,27 @@

#FileETag none


Probably the patch file shouldn't have the + on the line immediately after #FileETag none for .htaccess unless some versions have a different .htaccess file then is in their .htaccess.sample.  Maybe they'll release a patch to the patch so others don't have ongoing headaches...

Re: applying patch 6788 hunk failed

This is ridiculous. I'm no programmer, and barely manage to get patches installed correctly ...and they release a patch that obviously wasn't tested very well.  Why wont this successfully patch all the files it *does* find instead of crapping out?


My error message is:


Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.
patching file .htaccess
Hunk #1 succeeded at 216 (offset 9 lines).
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
I guess all i can do is wait and see if the put out a new patch. I'm not experienced enough with this to play around with extracting/copying over old/new versions,

Re: applying patch 6788 hunk failed

For all of those having issues here are a few tips that finally got mine to work.


Do all of these on a test box first.

1.) .HTACESS...This one is a pain.  You need to back up your current htaccess file somewhere.  Grab both the vanilla .htaccess and htaccess.sample file from a free download of your exact magento version.  Copy those over and run the patch.  The patch should at LEAST clear that file now.

Diff this new file with your old htacess file, and merge the new fixes.


2.) Any issues with any other failures.  Make sure you have applied every single other patch successfully.  My issue was that two older patches were not applied to our test server and the new 6788 wouldn't work.  After patching the older patches, the 6788 worked like a charm. 

Re: applying patch 6788 hunk failed

For me, the ".htaccess.sample" file did not exist. This has never been an issue during patching until today. Once I put the ".htaccess.sample" file in the root magento directory, the patch applied successfully. 


Edit: This enabled me to execute the patch sucessfully, but after the patch I have some major issues with my site. I haven't had time to fix the issue yet. I will reply when I find a resolution.

Re: applying patch 6788 hunk failed

I have had the same problem. Because I have installed the new patch allready I had to get the magento backup back. After i copied the backup into my magento folder I firstly patched magento with all the patches till update 6788 and then I executed the 6788 patch and it worked like a charm.

Re: applying patch 6788 hunk failed


@picablaat wrote:

Same here, I already uploaded a fresh .htaccess but now the patch is stuck with the following files:


patching file app/design/frontend/default/iphone/layout/customer.xml
Hunk #1 FAILED at 141.
Hunk #2 FAILED at 160.
2 out of 2 hunks FAILED -- saving rejects to file app/design/frontend/default/ip hone/layout/customer.xml.rej
patching file app/design/frontend/default/modern/layout/customer.xml
Hunk #1 FAILED at 156.
Hunk #2 FAILED at 175.
2 out of 2 hunks FAILED -- saving rejects to file app/design/frontend/default/mo dern/layout/customer.xml.rej


They have no different date than the other files in that directory....


 same issue any solution?