When I apply the above patch it is getting stuck at app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml at line 120. I have looked at the patch file and the code is

diff --git 
index 4ee6d76..47c3a79 100644
--- app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
+++ app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
@@ -120,6 +120,7 @@
                 <span><span><?php echo $this->__('Update Total') ?></span></span>
+            <?php echo $this->getBlockHtml('formkey') ?>
     <?php endif; ?>
     <script type="text/javascript">

Why is the error appearing?

Edit: Question is asking in the case of identical files.

  • it seems you've modified that file, you need to reset that file to its original code
    – Hunter
    Jun 6, 2017 at 7:40
  • I have just reset the file to its original and am still receiving the same message? Jun 6, 2017 at 7:45
  • 1
    try install dos2unix, and in terminal go to project path and try run dos2unix app/design/frontend/rwd/default/template/checkout/cart/shipping.phtml
    – Hunter
    Jun 6, 2017 at 7:51
  • 1
    You put me on the right track. It must have been an invisible character or something. I downloaded the original version of Magento and copied the file and then the patch applied successfully. Jun 6, 2017 at 8:02
  • 3
    Possible duplicate of Security Patch SUPEE-9767 - Possible issues? Jun 14, 2017 at 5:32

2 Answers 2


When applying patch, make sure you did not change the magento core code, if there is an error for a specific file, try to download the original Magento file and replace the error file. If you are migrating from windows to Unix/Linux machine, some of the core code will have end of line issue, therefore you need to reformat it to unix format, for this case i install dos2unix to fix the end of line problem.


Because that file is not as Magento is expecting it to be. It appears that it has been modified to put the formkey in it. If you have a look at Security Patch SUPEE-9767 - Possible issues? you'll see what you need to do

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.