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

  • Home
  • SEARCH
  • 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 3426688
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:44:45+00:00 2026-05-18T06:44:45+00:00

I created a module that used a custom widget/grid/column for my admin grid to

  • 0

I created a module that used a custom widget/grid/column for my admin grid to display a thumbnail image and everything worked. Now I need to create another module in the same project that does the same thing, but the image column will not work. It appears like its not even loading my new class, since it won’t execute any stmt I put into the file. I know its properly loading data, b/c if I change the type to text, then the correct info from the DB is populated into the field. But when I change to my new ‘image’ type the cell is empty. does anyone know why it wouldn’t be working?

ABT/Background/etc/config.xml << doesn’t work

<global>
    ....
    <blocks>
        <background>
            <class>ABT_Background_Block</class>
        </background>
        <adminhtml>
            <rewrite>
                <widget_grid_column>ABT_Background_Block_Widget_Grid_Column</widget_grid_column>
            </rewrite>
        </adminhtml>
    </blocks>
    ....
</global>

the module I copied to get me up and running has the exact same config setup, but yet it works fine
ABT/Feature/etc/config.xml << this works correctly

<global>
    ....
    <blocks>
        <feature>
            <class>ABT_Feature_Block</class>
        </feature>
        <adminhtml>
            <rewrite>
                <widget_grid_column>ABT_Feature_Block_Widget_Grid_Column</widget_grid_column>   
            </rewrite>
        </adminhtml>
    </blocks>
    ....
</global>
  • 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-05-18T06:44:46+00:00Added an answer on May 18, 2026 at 6:44 am

    Here’s what happening with Magento when you rewrite a class.

    When Magento instantiates a Block class, it uses code something like the following

    $this->getLayout()->createBlock('adminhtml/widget_grid_column')
    

    The createBlock method is a factory. Magento uses the identifier

    adminhtml/widget_grid_column
    

    to lookup which class should be instantiated. By default, that’s

    Mage_Adminhtml_Block_Widget_Grid_Column
    

    When you create your rewrite, you’re telling Magento

    Hey. instead of using ‘Mage_Adminhtml_Block_Widget_Grid_Column’ for a ‘adminhtml/widget_grid_column’, you should use ‘ABT_Background_Block_Widget_Grid_Column’

    This means that, for any given system, a class may only be rewritten once. In the code you’re showing above, you’re trying to rewrite the class twice. Only one of your rewrites will win.

    The quick approach I’d take is to keep all your customizations in a single override class.

    More generally, I try to avoid using rewrites if at all possible. They’re a powerful system, but should be using sparingly. I haven’t done much grid customizing, but the general approach I’d try to take would be to change the adminhtml layout to instantiate a new grid class from my custom module that extends an existing grid class, which in turn may use custom column classes.

    More work up front, but once you’ve figured it out you can use the technique over and over again, and not worry abou conflicts from a rewrite.

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

Sidebar

Related Questions

I have created a Python module that creates and populates several SQLite tables. Now,
I'd like to create several modules that will be used in nearly all scripts
I'm currently trying to create a kernel module that will produce data based on
I'd like to create a module in DNN that, similar to the Announcements control,
Typically I create a plugin when I have a module that I know I'm
I have an executable module created by third party. I would like to inject
I'm creating an API for a module and after I created several methods inside
When I extract files from a ZIP file created with the Python zipfile module,
Hi I need to create a module in drupal to display some data, not
I notice in several API's, that you may create a struct which is used

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.