I'm trying to override the Mage_Adminhtml_Block_Sales_Order_Grid class, but no success with that.

My config.xml file:

<?xml version="1.0"?>

My overriding PHP File located on /app/code/local/AD/Tweaks/Adminhtml/Block/Sales/Order/Grid.php:

    class AD_Tweaks_Adminhtml_Block_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid
        public function __construct()
            // ***This function should be executed, but it fails***
            Mage::log('Class ' . get_class($this) . ' is being created');

I tried even to put a Mage::log('1111'); statement on top of the overriding class (before the class operator), but it probably doesn't loads my PHP file because there is no 1111 shown in logs.

The error is displayed in the browser is:

Fatal error: Call to a member function setSaveParametersInSession() on a non-object in /var/www/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php on line 66

2 Answers 2


You Rewrite grid file location is wrong


should be


Also need to chnage in classs





  • 1
    Are you sure it should be AD_Tweaks_Block_Adminhtml_Block_Sales_Order_Grid with double Block word? Sep 7, 2014 at 18:01
  • Anyway, it doesn't work. Also are sure that Adminhtml and Block should be swapped? Notice that I'm trying to override Mage_Adminhtml_Block_Sales_Order_Grid — so look to the placement of these words. Sep 7, 2014 at 18:03

Well, I solved the problem just by changing the files permissions to www-data instead of root.

  • I am also facing same problem not abel to override Mage_Adminhtml_Block_Permissions_User_Grid Sep 11, 2014 at 9:51
  • @AnishaShaikh, have you tried to do this by placing to the config.xml file <global><blocks><adminhtml><rewrite><permissions_user_grid>Your_Module_Block_Permissions_User_Grid</permissions_user_grid></rewrite></adminhtml></blocks></global> Sep 11, 2014 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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