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.
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.
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
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: