I generated a module using this online tool: http://www.silksoftware.com/magento-module-creator/

I am now facing this error:

PHP Fatal error: Uncaught Error: Call to a member function setSaveParametersInSession() on boolean in app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php:66

But I don't know how I could debug it. Website is running on Magento CC 1.9.3. Saw this setSaveParametersInSession() on a non-object and that Fatal error: Call to a member function setSaveParametersInSession() on a non-object in aBlock\Widget\Grid\Container.php on line 66 but don't see what I could change.

A dump in core's Container.php, on $this->_blockGroup.'/'.$this->_controller.'_grid' returns me this: 'destinataires/adminhtml_destinataireschauvinfrance_grid'

Which seems right. Am I wrong?

An extract of my config.xml :

        <destinataires module="destinataires">
          <destinataireschauvinfrance module="destinataires">
            <title>Manage Destinataireschauvinfrance</title>

My Block/Adminhtml/Destinataireschauvinfrance.php :


class Canalweb_Destinataires_Block_Adminhtml_Destinataireschauvinfrance extends Mage_Adminhtml_Block_Widget_Grid_Container{

    public function __construct()
        $this->_controller = "adminhtml_destinataireschauvinfrance";
        $this->_blockGroup = "destinataires";
        $this->_headerText = Mage::helper("destinataires")->__("Destinataireschauvinfrance Manager");
        $this->_addButtonLabel = Mage::helper("destinataires")->__("Add New Item");

Beginning of my Block/Adminhtml/Destinataireschauvinfrance/Grid.php :


class Canalweb_Destinataires_Block_Adminhtml_Destinataireschauvinfrance_Grid extends Mage_Adminhtml_Block_Widget_Grid

    public function __construct()

What am I not seeing?


You state in your config.xml that the admin front name of your module is "admin_destinataires" but then you use "destinataires" as the blockgroup.

Try replacing

$this->_blockGroup = "destinataires";


$this->_blockGroup = "admin_destinataires";


The 'Call to a member function setSaveParametersInSession() on boolean' error is caused when the grid container class/block cannot find the grid class/block. So my money is still at that the blockgroup you are using is wrong.

If the above does not solve your problem, try replacing all instances of admin_destinataires with destinataires.

  • Yes! Replacing all instances of admin_destinataires was the trick. Thank you very, very much!
    – galenskap
    Oct 25 '17 at 15:38

Your Answer

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

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