Try the Demo

Magento Forum

   
Admin Fatal Error. No Login Screen
 
ijwinkleri
Jr. Member
 
Total Posts:  1
Joined:  2011-11-15
 

After updating from 1.6 to 1.7.0.2, instead of getting the normal login screen at /admin, I’m getting:

Fatal error: Call to a member function getUsername() on a non-object in /home/site/public_html/app/design/adminhtml/default/default/template/page/header.phtml on line 33

I’ve attempted to re-load the update files, thinking perhaps a file failed to load properly.
I’ve cleared temp files, history, cookies, etc. and tried multiple computers thinking it might be related to having a previously active session.

Neither of those actions have changed anything.

Logging into administration of the site is no longer possible, but the front end has no issues.

Any new ideas or assistance would be greatly appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
aarpol
Jr. Member
 
Total Posts:  12
Joined:  2010-02-17
 

I had the same issue. I have a staging copy of the site and a production copy. Staging was working, but production was behaving exactly as you described.

I’ve found that if I set the webserver user to own all the files and folders in the site, this issue goes away, which leads me to believe it’s a file permission error somewhere. I haven’t found where yet though.... All the usual suspects (/var/session, /var/cache and so on) were already set to 777 permissions.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sjgoodjob
Member
 
Avatar
Total Posts:  48
Joined:  2010-09-01
 

after upgrade from 1.5.* to 1.7.0.2, i got this error Fatal error: Call to a member function getUsername() on a non-object in /home/wwwroot/etsivan/app/design/adminhtml/default/default/template/page/header.phtml on line 33

 Signature 

china cheap stuff free shipping all over the world
</br>
oemheadset

 
Magento Community Magento Community
Magento Community
Magento Community
 
sjgoodjob
Member
 
Avatar
Total Posts:  48
Joined:  2010-09-01
 

after check i found the problem,you should check the config file adminhtml/default/default/layout/main.xml
add this code to your main.xml

<adminhtml_dashboard_customersmost>
        <
block type="core/text_list" name="root" output="toHtml">
            <
block type="adminhtml/dashboard_tab_customers_most" name="adminhtml.dashboard.tab.customers.most"/>
        </
block>
    </
adminhtml_dashboard_customersmost>

    <
adminhtml_dashboard_customersnewest>
        <
block type="core/text_list" name="root" output="toHtml">
            <
block type="adminhtml/dashboard_tab_customers_newest" name="adminhtml.dashboard.tab.customers.newest"/>
        </
block>
    </
adminhtml_dashboard_customersnewest>

    <
adminhtml_dashboard_productsviewed>
        <
block type="core/text_list" name="root" output="toHtml">
            <
block type="adminhtml/dashboard_tab_products_viewed" name="adminhtml.dashboard.tab.products.viewed"/>
        </
block>
    </
adminhtml_dashboard_productsviewed>

    <
adminhtml_index_login>
        <
block type="core/text_list" name="root" output="toHtml">
            <
block type="adminhtml/template" name="content" template="login.phtml">
                <
block type="core/text_list" name="form.additional.info" />
            </
block>
        </
block>
    </
adminhtml_index_login>

    <
adminhtml_index_forgotpassword>
        <
block type="core/text_list" name="root" output="toHtml">
            <
block type="adminhtml/template" name="content" template="forgotpassword.phtml">
                <
block type="core/text_list" name="form.additional.info" />
            </
block>
        </
block>
    </
adminhtml_index_forgotpassword>

 Signature 

china cheap stuff free shipping all over the world
</br>
oemheadset

 
Magento Community Magento Community
Magento Community
Magento Community
 
kevinconroy
Jr. Member
 
Total Posts:  7
Joined:  2009-01-22
 

Thanks - this solved my problem! Note to others: After you made these code changes you’ll need to clear the var/sessions and var/cache directories.

http://www.magentocommerce.com/boards/viewthread/289770/

 
Magento Community Magento Community
Magento Community
Magento Community
 
akewmagento
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2011-06-12
 

<adminhtml_dashboard_customersmost>
            <
block type="core/text_list" name="root" output="toHtml">
                <
block type="adminhtml/dashboard_tab_customers_most" name="adminhtml.dashboard.tab.customers.most" />
            </
block>
        </
adminhtml_dashboard_customersmost>

        <
adminhtml_dashboard_customersnewest>
            <
block type="core/text_list" name="root" output="toHtml">
                <
block type="adminhtml/dashboard_tab_customers_newest" name="adminhtml.dashboard.tab.customers.newest" />
            </
block>
        </
adminhtml_dashboard_customersnewest>

        <
adminhtml_dashboard_productsviewed>
            <
block type="core/text_list" name="root" output="toHtml">
                <
block type="adminhtml/dashboard_tab_products_viewed" name="adminhtml.dashboard.tab.products.viewed" />
            </
block>
        </
adminhtml_dashboard_productsviewed>

        <
adminhtml_index_login>
            <
block type="core/text_list" name="root" output="toHtml">
                <
block type="adminhtml/template" name="content" template="login.phtml">
                    <
block type="core/text_list" name="form.additional.info" />
                </
block>
            </
block>
        </
adminhtml_index_login>

        <
adminhtml_index_forgotpassword>
            <
block type="core/text_list" name="root" output="toHtml">
                <
block type="adminhtml/template" name="content" template="forgotpassword.phtml">
                    <
block type="core/text_list" name="form.additional.info" />
                </
block>
            </
block>
        </
adminhtml_index_forgotpassword>

nice !! this solution worked to me!!

 Signature 

Information is Power

Stackoverflow

 
Magento Community Magento Community
Magento Community
Magento Community
 
ketaki
Jr. Member
 
Total Posts:  8
Joined:  2012-02-28
 

i have same issue…

this error display if we r made some changes in main.xml
adminhtml/default/default/layout/main.xml .......

so , copy main.xml from your base folder and replace it in your theme...... tongue wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
Monty22
Guru
 
Avatar
Total Posts:  672
Joined:  2013-01-01
 

Hi,

My instance of Magento had some customizations, specifically I had made edits to magento/app/design/adminhtml/default/default/layout/main.xml

There were new additions made to this file during the 1.7 upgrade, and if you made customizations to this file, then you may have omitted the new sections. Here’s what you need to add if you don’t already have it:

<adminhtml_dashboard_customersmost>
            <
block type="core/text_list" name="root" output="toHtml">
                <
block type="adminhtml/dashboard_tab_customers_most" name="adminhtml.dashboard.tab.customers.most" />
            </
block>
        </
adminhtml_dashboard_customersmost>

        <
adminhtml_dashboard_customersnewest>
            <
block type="core/text_list" name="root" output="toHtml">
                <
block type="adminhtml/dashboard_tab_customers_newest" name="adminhtml.dashboard.tab.customers.newest" />
            </
block>
        </
adminhtml_dashboard_customersnewest>

        <
adminhtml_dashboard_productsviewed>
            <
block type="core/text_list" name="root" output="toHtml">
                <
block type="adminhtml/dashboard_tab_products_viewed" name="adminhtml.dashboard.tab.products.viewed" />
            </
block>
        </
adminhtml_dashboard_productsviewed>

        <
adminhtml_index_login>
            <
block type="core/text_list" name="root" output="toHtml">
                <
block type="adminhtml/template" name="content" template="login.phtml">
                    <
block type="core/text_list" name="form.additional.info" />
                </
block>
            </
block>
        </
adminhtml_index_login>

        <
adminhtml_index_forgotpassword>
            <
block type="core/text_list" name="root" output="toHtml">
                <
block type="adminhtml/template" name="content" template="forgotpassword.phtml">
                    <
block type="core/text_list" name="form.additional.info" />
                </
block>
            </
block>
        </
adminhtml_index_forgotpassword>

Then, you’ll need to clear you Magento’s cache and sessions. If you have SSH, you can do this by doing the following:

cd magento/var/sessions
rm 
-rf *
cd magento/var/cache
rm 
-rf *

This will clear all current sessions and cache data. Your admin login page should work now.

If you need any kind of help you can contact us as we are one of best Magento extensions developer.

Thanks

Monty
iLoveMage

Get 25% discount all our Magento Extensions.

 Signature 

Get 15% discount on all our extensions Use code MON15 | Risk-free purchase with our 14 days Money Back Guarantee policy!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top