Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento custom admin page block layout issues
    primarykey
    data
    text
    <p>Hello I keep getting the following error when going to a admin page</p> <blockquote> <p>PHP Fatal error: Call to a member function setSaveParametersInSession() on a non-object in app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php on line 66</p> </blockquote> <p>Here is my controller:</p> <pre><code>class LTS_Categorymove_Adminhtml_BlacklistController extends Mage_Adminhtml_Controller_Action{ public function indexAction(){ $this-&gt;loadLayout(); var_dump(Mage::getSingleton('core/layout')-&gt;getUpdate()-&gt;getHandles()); $this-&gt;renderLayout(); } } </code></pre> <p>Here is my main block:</p> <pre><code>class LTS_Categorymove_Block_Adminhtml_Main extends Mage_Adminhtml_Block_Widget_Grid_Container{ protected $_addButtonLabel = 'Add New Example'; public function __construct(){ //error_log('fgboo'); $this-&gt;_controller = 'adminhtml_main'; $this-&gt;_blockGroup = 'categorymove'; $this-&gt;_headerText = 'Blacklist'; $this-&gt;_addButtonLabel = 'Button Here'; parent::__construct(); } protected function _prepareLayout(){ $this-&gt;setChild( 'grid', $this-&gt;getLayout()-&gt;createBlock( $this-&gt;_blockGroup.'/' . $this-&gt;_controller . '_grid', $this-&gt;_controller . '.grid')-&gt;setSaveParametersInSession(true) ); return parent::_prepareLayout(); } } </code></pre> <p>Now when I have googled the issue everyone keeps saying its a incorect _controller declration but from reading around they say that i should be using the block name which I am. Any help would be awesome thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload