Magento Upgrade - Fatal error: Call to a member function getUsername() on a non-object in - Will Hanke
 

Magento Upgrade – Fatal error: Call to a member function getUsername() on a non-object in

Written by +Will Hanke on March 12th, 2013

Today I upgraded a client to the latest version of Magento (1.7.0.2).  Upon finishing the FTP of the new version, I could see the front end of the website with no problem.  The backend, however, would not work becuase of this error:

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

At first I thought it was going to be a long, time consuming error, but turns out the fix is really easy.

The easiest way to fix it is to rename your /var/ folder to /var_old/ and then build a new /var/ folder.  This basically wipes out all cache, sessions, etc.

There may be cases where you can get away with just deleting all files from inside  /var/cache and var/session as well.

About 

Will Hanke is the Chief Search Marketing Strategist at Red Canoe Media, a top St. Louis Search Marketing & SEO firm. In addition to helping some of the city's most recognizable brands with their online marketing strategy, Will also is an Amazon bestselling author, speaker and teacher.

 

1 Comments so far ↓

  1. Will it’s official your a geek. 🙂 Thanks for the fix

Leave a Comment





What's Your SEO Score?

Enter the URL of any landing page or blog article and see how optimized it is for one keyword or phrase.