Hello Magento Experts,

I have a strange issue in one of my Magento1.9.x site. In the admin panel, when I log in and then I click Sales -> Orders -> Edit any pending order, I click on cancel, it just refreshed the page and nothing happens.

To debug further, I created a clone of the site, and uploaded it on my server, in that I fixed the cancel order issue and I was able to successfully cancel my order.

So I went on the live site and uploaded the same code there, but on live site, I got an error on clicking cancel button: Invalid Form key, please refresh the page.

What I fixed is below :

In file: app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php,

Before :

public function getCancelUrl()
return $this->getUrlSecure('*/*/cancel');

After :

public function getCancelUrl()
return return $this->getUrl('*/*/cancel');

Can someone please help me what can be the issue on live site?

Thank you.

  • Have you done compiplation in live site one's? – Dhiren Vasoya Aug 21 '20 at 5:11
  • No, as this is Magento1, i dont think compilation needed. Do i really need to do that? – Rakhesh Mishra Aug 21 '20 at 5:13
  • Yes, Magento1 have compilation option as well, try to do that one's and then check, But Before that take backup of the site. – Dhiren Vasoya Aug 21 '20 at 5:14
  • Thanks for the comments but i fixed it myself by creating a custom function for Cancel order :) – Rakhesh Mishra Aug 24 '20 at 3:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.