Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8044261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:10:20+00:00 2026-06-05T05:10:20+00:00

I’m following this tutorial http://codemagento.com/2011/03/creating-custom-magento-reports/ creating the simple report module. I have all the

  • 0

I’m following this tutorial http://codemagento.com/2011/03/creating-custom-magento-reports/ creating the simple report module. I have all the code and XML in place but I’m receiving this error

2012-05-31T21:48:43+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Adminhtml_Controller_Action::_addContent() must be an instance of Mage_Core_Block_Abstract, boolean given, called in /var/www/magento/app/code/local/Super/Awesome/controllers/Adminhtml/Report/ExampleController.php on line 22 and defined  in /var/www/magento/app/code/core/Mage/Adminhtml/Controller/Action.php on line 112

The structure looks like this

Super
  |_ Awesome
      |_Block
      |   |_Adminhtml
      |       |_Report
      |          |_Simple
      |          |   |_Grid.php
      |          |_Simple.php
      |_controllers
      |    |_Adminhtml
      |       |_Report
      |          |_ExampleController.php
      |_etc
      |   |_adminhtml.xml
      |   |_config.xml
      |_Helper
      |   |_Data.php
      |_Model
            |_Mysql4
            |    |_Report
            |    |   |_Simple
            |    |      |_Collection.php
            |    |_Simple.php
            |_Simple.php

I assume that it is not finding the block code but why?

Edit

<?xml version="1.0"?>
<config>
  <modules>
    <Super_Awesome>
      <version>0.1.0</version>
    </Super_Awesome>
  </modules>
  <admin>
    <!--
        Here we are telling the Magento router to look for the controllers in the Super_Awesome_controllers_Adminhtml before we look in the
        Mage_Adminhtml module for all urls that begin with /admin/controller_name
     -->
    <routers>
      <adminhtml>
        <args>
          <modules>
            <awesome before="Mage_Adminhtml">Super_Awesome_Adminhtml</awesome>
          </modules>
        </args>
      </adminhtml>
    </routers>
  </admin>
  <models>
    <awesome>
      <class>Super_Awesome_Model</class>
      <resourceModel>awesome_mysql4</resourceModel>
    </awesome>
    <awesome_mysql4>
      <class>Super_Awesome_Model_Mysql4</class>
      <entities>
        <simple>
          <table>super_awesome_example_simple</table>
        </simple>
      </entities>
    </awesome_mysql4>
  </models>
  <global>
    <resources>
      <awesome_setup>
        <setup>
          <module>Super_Awesome</module>
          <class>Super_Awesome_Model_Mysql4_Setup</class>
        </setup>
        <connection>
          <use>core_setup</use>
        </connection>
      </awesome_setup>
      <awesome_write>
        <connection>
          <use>core_write</use>
        </connection>
      </awesome_write>
      <awesome_read>
        <connection>
          <use>core_read</use>
        </connection>
      </awesome_read>
    </resources>
    <helpers>
      <awesome>
        <class>Super_Awesome_Helper</class>
      </awesome>
    </helpers>
  </global>
</config>

File: app/code/local/Super/Awesome/Block/Adminhtml/Report/Simple.php

class Super_Awesome_Block_Adminhtml_Report_Simple extends Mage_Adminhtml_Block_Widget_Grid_Container
{
    public function __construct()
    {
        $this->_blockGroup = 'awesome';
        $this->_controller = 'adminhtml_report_simple';
        $this->_headerText = Mage::helper('awesome')->__('Simple Report');
        parent::__construct();
        $this->_removeButton('add');
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:10:23+00:00Added an answer on June 5, 2026 at 5:10 am

    When you (or Magento) uses the following code

    $this->getLayout()->createBlock('awesome/adminhtml_report_simple')
    

    you’re saying

    Please create a adminhtml_report_simple block from the awesome group

    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 false instead of returning a block object, and that’s why you’re getting that exception.

    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.

    <config>
        <global>
            <helpers>
                <awesome>
                    <class>Super_Awesome_Helper</class>
                </awesome>
            </helpers>
        </global>
    </config>
    

    That’s why your module can use helper classes. You just need to do the same thing for block classes

    <config>
        <global>
            <blocks>
                <awesome>
                    <class>Super_Awesome_Helper</class>
                </awesome>
            </blocks>
        </global>
    </config>
    

    That and a cache clear should set you right. If it doesn’t work, trace createBlock to determine where it’s looking in the configuration for the blocks/awesome node. That’s usually enough for me to notice the typo I’ve been starting at for two hours.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am doing a simple coin flipping experiment for class that involves flipping a
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.