title: Magento: Fatal error: Call to a member function toHtml() on a non-object
body: <p>I get this error when I try to load my block in controller</p>
  
  <p>Fatal error:  Call to a member function toHtml() on a non-object in ... on line ...</p>
  
  <p>This is my config.xml</p>
  
  <pre><code>&lt;blocks&gt;
    &lt;auction&gt;
      &lt;class&gt;Custom_Auction_Block&lt;/class&gt;
    &lt;/auction&gt;
  &lt;/blocks&gt;
  </code></pre>
  
  <p>I call my block with this code in controller:</p>
  
  <pre><code>$this-&gt;loadLayout();
  $autoupdate= $this-&gt;getLayout()-&gt;getBlock('auction.auto.update')-&gt;toHtml();
  Mage::register('referrer_url', $this-&gt;_getRefererUrl());
  $response['autoupdate'] = $autoupdate;
  </code></pre>
  
  <p>I create block in auction/block/product/autoupdate.php</p>
  
  <pre><code>class Custom_Auction_Block_Product_Autoupdate extends Mage_Core_Block_Template{   
  </code></pre>
  
  <p>}</p>
  
  <p>Here is my layout</p>
  
  <pre><code>&lt;block type="auction/product_view" name="auction_view" template="auction/catalog/product/view.phtml"&gt;
          &lt;block type="auction/product_autoupdate" name="auction.auto.update" as="auction_autoupdate" template="auction/catalog/product/autoupdate.phtml"/&gt;
    &lt;/block&gt;
  </code></pre>
  
  <p>I try to add "protected function _toHtml()" in my block too.. but it doesn't work.</p>
  
  <p>Anyone can help me? FYI, I use magento 1.6.2.0
  Thx in advance :)</p>