Magento Forum

   
Error in file: “/home/demolink/public_html/clients.demolink.biz/gand2/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.0-1.4.0.0. 
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

Hi..
We were just doing a upgrade from 1.3.x to 1.7.x.

It runs for few minutes and then shows this error,

Error in file: “/home/demolink/public_html/clients.demolink.biz/gand2/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php” - SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘0’ for key 2

Trace:
#0 /home/demolink/public_html/clients.demolink.biz/gand2/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception(’Mage_Core’, ‘Error in file: ...’)
#1 /home/demolink/public_html/clients.demolink.biz/gand2/app/code/core/Mage/Core/Model/Resource/Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb(’upgrade’, ‘1.4.0.0.0’, ‘1.6.2.0.1’)
#2 /home/demolink/public_html/clients.demolink.biz/gand2/app/code/core/Mage/Core/Model/Resource/Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb(’1.4.0.0.0’, ‘1.6.2.0.1’)
#3 /home/demolink/public_html/clients.demolink.biz/gand2/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/demolink/public_html/clients.demolink.biz/gand2/app/code/core/Mage/Core/Model/App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/demolink/public_html/clients.demolink.biz/gand2/app/code/core/Mage/Core/Model/App.php(343): Mage_Core_Model_App->_initModules()
#6 /home/demolink/public_html/clients.demolink.biz/gand2/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#7 /home/demolink/public_html/clients.demolink.biz/gand2/index.php(87): Mage::run(’’, ‘store’)
#8 {main}

Clueless, how to fix that. Anyone ?

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

Did you try this:

SET FOREIGN_KEY_CHECKS 0;

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

Yes, checked that option before exporting the 1.3.x database from phpmyadmin.

Is there any other place, I place it now and retry ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

Ok I took an export of database from the SSH command line.

Opened it with TextMate and placed those on the top and end.

http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/restoring_a_backup_of_a_magento_database

Then again ran the upgrade.

Its the same issue.

What to do ?

How to get past this error ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

Ok I took my old school method into action.

Kept on renaming the file, until it was fixed and then the site was finally upgraded.

Now everything works fine, but at one place, I see a error.

Manage Customers > Just edited a random user.

On the next page, I get this error,

Fatal error: Call to a member function setRenderer() on a non-object in /home/demolink/public_html/clients.demolink.biz/gand1/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php on line 77

Image Attachments
Screen Shot 2012-07-26 at 1.15.44 PM.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

I just checked the log files and found this,

2012-07-26T09:51:44+00:00 ERR (3): Recoverable Error: Argument 1 passed to Mage_Eav_Model_Attribute_Data::factory() must be an instance of Mage_Eav_Model_Attribute, instance of Mage_Eav_Model_Entity_Attribute given, called in /home/demolink/public_html/clients.demolink.biz/gand1/app/code/core/Mage/Customer/Block/Address/Renderer/Default.php on line 110 and defined in /home/demolink/public_html/clients.demolink.biz/gand1/app/code/core/Mage/Eav/Model/Attribute/Data.php on line 59

So, what should be the next step ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

I found one user with the same problem,
http://www.magentocommerce.com/boards/viewthread/264382/

He has exactly the same error, but he has not clarified, how to find the culprit attribute ID.

Can you check ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

Everytime, I clear cache, I get this error,

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘Reminder: Change Magento`s default phone numbers and callouts be’ for key ‘title’

I go into the phpmyadmin and truncate the admin_notification table.

Then it works.

Then again, when I clear the cache or purge it, the error re appears.

What a permanent fix ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

All the issues have been fixed.

Just the above issues and we are game!

Let me know, how to fix this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

Everytime, I clear cache, I get this error,

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘Reminder: Change Magento`s default phone numbers and callouts be’ for key ‘title’

I go into the phpmyadmin and truncate the admin_notification table.

Then it works.

Then again, when I clear the cache or purge it, the error re appears.

What a permanent fix ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MageClub
Guru
 
Avatar
Total Posts:  382
Joined:  2009-07-25
India
 

Ok I fixed the issue by over riding,

/app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php

 
Magento Community Magento Community
Magento Community
Magento Community
 
shappyking
Jr. Member
 
Total Posts:  6
Joined:  2012-12-12
 

Hi MageClub, I saw you resolved this issue. I am haveing the EXACT issue and i am seeking some assistance from you. Can you please tell me step by step how i can eliminate this error below

Fatal error: Call to a member function setRenderer() on a non-object in /var/www/html/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php on line 77

Thank you very much in advanced, i know it is not advisable, but i upgraded the live site and this error is not allow new users to signup and in the back-end i cannot edit a user account.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top