I'm getting setSaveParametersInSession() on a non-object
It is on an admin module the path is
Training/Distributor/Block/Adminhtml/
in this folder i have
Distributor/Grid.php
and Distributor.php
class Training_Distributor_Block_Adminhtml_Distributor
extends Mage_Adminhtml_Block_Widget_Grid_Container
{
/**
* my understanding:
* $this->_blockGroup . '/' . $this->_controller . '_grid'
* i.e. training_distributor/adminhtml_distributor_grid
*/
public function _construct()
{
$this->_blockGroup = 'training_distributor';
$this->_controller = 'adminhtml_distributor';
$this->_headerText = $this->__('List Distributors');
$this->_addButtonLabel = $this->__('Add Distributor');
parent::_construct();
}
}
Why do I get this error?
I can't see any typo's and I'm sure $this->_blockGroup and $this->_controller are right.
Are there any other things I need to look for? or have I missed something?
After a search on google and stack I have found people usually _blockGroup or _controller, but this doesn't seem to be the case for me
===
EDIT
===
<config>
<modules>
<Training_Distributor>
<version>0.0.2</version>
</Training_Distributor>
</modules>
<global>
<resources>
<training_distributor_setup>
<setup>
<module>Training_Distributor</module>
</setup>
</training_distributor_setup>
</resources>
<models>
<training_distributor>
<class>Training_Distributor_Model</class>
<resourceModel>training_distributor_resource</resourceModel>
</training_distributor>
<training_distributor_resource>
<class>Training_Distributor_Model_Resource</class>
<entities>
<distributor>
<table>training_distributor_entity</table>
</distributor>
</entities>
</training_distributor_resource>
</models>
<blocks>
<training_distributor>
<class>Training_Distributor_Block</class>
</training_distributor>
</blocks>
<helpers>
<training_distributor>
<class>Training_Distributor_Helper</class>
</training_distributor>
</helpers>
</global>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<training_distributor before="Mage_Adminhtml">Training_Distributor_Adminhtml</training_distributor>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<training_distributor>
<file>training/distributor.xml</file>
</training_distributor>
</updates>
</layout>
</adminhtml>
</config>
config.xml
file also.__construct
method instead of_construct
.