[Solved] Magento admin grid was not displaying only header title and add button are present


There is a problem with your Model folder structure. I’m not an expert on magento but I think you separate your resource model and collection model into separate folder.

Based on @Nicolas D answer, I also encounter this problem on magento 1.9.1. It also took me several days to find out the solution.

Yes, @Nicolas D is right, you have to put your resource folder on Mysql4 folder. However, under Mysql4 folder, you have to create a folder the same name as your module name and put your Collection.php model.

For example:

Instead of

Rts_Pmadmin_Model_Mysql4_Resource

Make it

Rts_Pmadmin_Model_Mysql4_Pmadmin

Also! Don’t forget to update your config.xml and other file related to your changes.

<models>
    <pmadmin>
        <class>Rts_Pmadmin_Model</class>
        <resourceModel>pmadmin_resource</resourceModel>
    </pmadmin>
    <pmadmin_resource>
        <class>Rts_Pmadmin_Model_Mysql4</class>
        <entities>
            <pmadmin>
                <table>pmadmin</table>
            </pmadmin>
        </entities>
    </pmadmin_resource>
</models>
<resources>
    <pmadmin_setup>
        <setup>
            <module>Rts_Pmadmin</module>
           <class>Rts_Pmadmin_Model_Mysql4_Pmadmin_Mysql4_Setup</class>
        </setup>
        <connection>
            <use>core_setup</use>
        </connection>
    </pmadmin_setup>
    <pmadmin_write>
        <connection>
            <use>core_write</use>
        </connection>
    </pmadmin_write>
    <pmadmin_read>
        <connection>
            <use>core_read</use>
        </connection>
    </pmadmin_read>
</resources>

I don’t know if this is a magento bug but this is how we solved our problem.

0

solved Magento admin grid was not displaying only header title and add button are present