Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>When you (or Magento) uses the following code</p> <pre><code>$this-&gt;getLayout()-&gt;createBlock('awesome/adminhtml_report_simple') </code></pre> <p>you're saying</p> <blockquote> <p>Please create a <code>adminhtml_report_simple</code> block from the <code>awesome</code> group</p> </blockquote> <p>Magento needs to know the base name of the class to use for blocks from the awesome group. If you don't tell Magento what the base name of the class to use for blocks from the awesome group, it can't instantiate a block. That's why calls to the method are returning <code>false</code> instead of returning a block object, and that's why you're getting that exception.</p> <p>You need to "turn on" blocks for your module by adding a section to your configuration. Based on your example above, you've already done something similar for helper classes.</p> <pre><code>&lt;config&gt; &lt;global&gt; &lt;helpers&gt; &lt;awesome&gt; &lt;class&gt;Super_Awesome_Helper&lt;/class&gt; &lt;/awesome&gt; &lt;/helpers&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>That's why your module can use helper classes. You just need to do the same thing for <strong>block</strong> classes </p> <pre><code>&lt;config&gt; &lt;global&gt; &lt;blocks&gt; &lt;awesome&gt; &lt;class&gt;Super_Awesome_Helper&lt;/class&gt; &lt;/awesome&gt; &lt;/blocks&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>That and a cache clear should set you right. If it doesn't work, trace <code>createBlock</code> to determine where it's looking in the configuration for the <code>blocks/awesome</code> node. That's usually enough for me to notice the typo I've been starting at for two hours. </p>
 

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