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:  13
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
 
sevenusd
Member
 
Avatar
Total Posts:  53
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

 
Magento Community Magento Community
Magento Community
Magento Community
 
sevenusd
Member
 
Avatar
Total Posts:  53
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>

 
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!!

 
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
Magento Community
Magento Community
    Back to top