Magento Forum

   
Fatal error: Call to a member function getBackend() on a non-object after moving to a new server
 
drakhul
Jr. Member
 
Total Posts:  2
Joined:  2011-03-10
 

I am trying to move an instance of Magento from a linux host to a windows <shudder> host for a client.  I have put the entire doc root on the new server, and imported the database.  The home page loads up fine.  My problem is, when I try to log into admin, I get the following error:

Fatal error: Call to a member function getBackend() on a non-object in C:\[path to doc root]\app\code\core\Mage\Eav\Model\Entity\Collection\Abstract.php on line 451

I have googled but cannot find a solution. 

I did try emptying the /var folder (as seen in a couple posts) but still no go.

Since I cannot log into admin, I don’t know how to get the version number of this installation.

Any help would be most appreciated.

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Turnkeye
Moderator
 
Avatar
Total Posts:  908
Joined:  2008-12-20
URL: turnkeye.com
 

It is very difficult to say what is wrong without code debugging.

I think it is connected with Windows permissions on some Mage core folder/files.

 
Magento Community Magento Community
Magento Community
Magento Community
 
drakhul
Jr. Member
 
Total Posts:  2
Joined:  2011-03-10
 

I have the permissions set to Everyone>Full Control on the entire document root.

Any other ideas?  My client is going nuts.  My only other option is to start all over from scratch.

If I install the latest version, is there a way to import the old database?

Please someone gimme ideas… LOL

 
Magento Community Magento Community
Magento Community
Magento Community
 
Turnkeye
Moderator
 
Avatar
Total Posts:  908
Joined:  2008-12-20
URL: turnkeye.com
 
drakhul - 15 March 2011 06:29 AM

If I install the latest version, is there a way to import the old database?

You can export products to CSV and import it to the new Magento installation

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3216
Joined:  2009-02-26
Minneapolis MN
 

Have you tried this?

http://www.magentocommerce.com/wiki/how_to_fix_login_for_admin_on_local_install

 
Magento Community Magento Community
Magento Community
Magento Community
 
WMechelle
Member
 
Avatar
Total Posts:  52
Joined:  2009-12-16
 

Fatal error: Call to a member function getBackend() on a non-object in XXXXpublic_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 450

I am also getting this error after I did an upgrade.

The code in question is this:

if ($attributeInstance->getBackend()->isStatic()) {
$attrField = ‘{{attribute}}’ . $attributeItem;
} else {
$this->_addAttributeJoin($attributeItem, ‘left’);
$attrField = $this->_getAttributeFieldName($attributeItem);
}
}

I am running 2 stores and have custom templates for each.  Any insight?  I have done the clearing of the var file and such and that does not work for this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3216
Joined:  2009-02-26
Minneapolis MN
 

Are you running a Windows Server?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Christian_DE
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2011-09-11
Aachen, Germany
 

Hi all,
I have the same problem if I try to click through product groups:

Fatal error: Call to a member function getBackend() on a non-object in C:\xampp\htdocs\magento\app\code\core\Mage\Eav\Model\Entity\Abstract.php on line 816

I use a local installation on a MS Windows 7 PC! Any ideas?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brent W Peterson
Moderator
 
Avatar
Total Posts:  3216
Joined:  2009-02-26
Minneapolis MN
 

@Christian_DE:: There was a reason back in July that asked if it was a Windows machine.... now I just have to figure out why!!

Have you searched the site for Windows getBackend() non-object?

 
Magento Community Magento Community
Magento Community
Magento Community
 
rudraraj
Jr. Member
 
Total Posts:  14
Joined:  2011-11-15
 

Hi,

I have the same problem while files are uploaded in Linux Server

Fatal error: Call to a member function getBackend() on a non-object in /home/<account>/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816

It is working fine while i am working in WAMP. but after uploading to server.. its showing the error..

Please help me..

 
Magento Community Magento Community
Magento Community
Magento Community
 
mgobind
Jr. Member
 
Total Posts:  1
Joined:  2011-12-04
 

Hi, regarding the issue “Fatal error: Call to a member function getBackend() on a non-object in /home/<account>/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816”
i had the same problem on my theme installation. The theme you use has a layout block that is actually looking for some data (object). I just had to add a product to the catalogue so that it had an object to reference to and display in the block.

best regards,
Manolito

 
Magento Community Magento Community
Magento Community
Magento Community
 
gorave
Jr. Member
 
Total Posts:  3
Joined:  2011-11-18
 

i hv got similar kind of error...im trying to sync magento n sugar crm...!

Fatal error: Call to a member function getFirstname() on a non-object in G:\wamp\www\magento\app\code\core\Mage\Customer\controllers\AccountController.php on line 267

my code:
public function createPostAction() {

$options=array(
“location” =>’http://localhost/SugarCE-Full-6.3.1/soap.php?wsdl’,
“uri"=>’http://localhost/SugarCE-Full-6.3.1’,
“trace"=>1
);

$user_auth=array(
“user_name"=>’name’,
“password"=>’md5’,
“version"=>’6.3.1’
);
$client=new SoapClient(Null,$options);
$response=$client->login($user_auth,’test’);
$session_id=$response->id;

$response = $client->set_entry($session_id,’Leads’,
my error line

array("name"=>’first_name’,"value"=>$customer->getFirstname()),


array("name"=>’last_name’,"value"=>$customer->getLastname()),
array("name"=>’email1’,"value"=>$customer->getEmail())
);
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top