Fatal error: Call to a member function getAttributeCode() on a non-object in /home/-----/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 336
On every page, even /admin, cannot get any further. Seems like something happened with the EAVs...!
Fatal error: Call to a member function getBackend() on a non-object in /var/www/path/httpdocs/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 379
While upgrades on some sites are fine, one site comes up with
Fatal error: Call to a member function getBackend() on a non-object in /var/www/kugan/pecco/www2/pecnew/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php on line 379
I have no ideas at this time except as mentioned it has something to do with EAV and it doesn’t like
I think now that one of the EAV database tables is corrupted!
Yep, I’m thinking the same thing. Luckily I made a backup so our site was only down for 30 minutes whilst we restored, but I’ve made a local copy and can’t seem to find the root of the problem.
My one site that crashed was pre-production so not too much of a problem except I did make a DB backup before doing upgrade, as well as trying it on a local machine, but when I restored the DB it still didn’t work presumably because changes had been made to the core.
On production sites it would be wise to backup the entire site and the DB before upgrade!
My one site that crashed was pre-production so not too much of a problem except I did make a DB backup before doing upgrade, as well as trying it on a local machine, but when I restored the DB it still didn’t work presumably because changes had been made to the core.
On production sites it would be wise to backup the entire site and the DB before upgrade!
I did, thankfully, or we’d have lost days worth of trading!
I’ve just tried the update on a local copy of the site now, same problem, so I need to now fix the issue, whatever it is, as I don’t want to be stuck at 1.1.6 forever… =(
It’s not a problem with any .phtml files, because I renamed the themed used so it used default, exact same error. Must be in the database or the code PHP files.
If I run
SELECT *
FROM `eav_attribute`
WHERE `attribute_code` LIKE ‘name’
LIMIT 0 , 30
on both the (now proken) test site at 1.1.7 and the live site at 1.1.6 I get exactly the same recordset. So it’s presumably the code, then?
I appreciate your dilemma. I have had to start afresh using original theme but what is curious is that my local Windows test site was a mirror of the pre-production site but upgraded without a problem. I couldn’t easily carry out the usual debugging processes so gave up.
I appreciate your dilemma. I have had to start afresh using original theme but what is curious is that my local Windows test site was a mirror of the pre-production site but upgraded without a problem. I couldn’t easily carry out the usual debugging processes so gave up.
Unfortunately I don’t have that luxury, this needs to work on our current live site, we can’t start again!
I also have the same error. Clearing cache made no difference. hoping redpen has the answer…
Right, try this:
Go into PHPMyAdmin, and find the eav_attribute table. You’ll see a few fields that (in my case) had no values in for certain attributes, and I think they should be “NULL”. These are: attribute_model, backend_model, backend_table, frontend_model and source_model.
Use this SQL [ UPDATE eav_attribute SET source_model = NULL WHERE source_model = “” ] on each of those fields, obviously changing source_model in the SQL to the name of the table (note it’s in there twice). Do this for all 5 fields, then refresh your Magento page. It worked for me, but please let me know if it worked for you, took me about 6 hours to figure that out…
Awesome! I confirm, this is working. Here’s the 5 queries :
UPDATE eav_attribute SET attribute_model = NULL WHERE attribute_model = '' UPDATE eav_attribute SET backend_model = NULL WHERE backend_model = '' UPDATE eav_attribute SET backend_table = NULL WHERE backend_table = '' UPDATE eav_attribute SET frontend_model = NULL WHERE frontend_model = '' UPDATE eav_attribute SET source_model = NULL WHERE source_model = ''
Now I have another bug… in Categories… grrrr..! I’m starting to have doubt about this relase, might not be ready for prime time. Anyone know why this is happening?