Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

upgraded from 1.8 to 2.0 - Error in file: “/home/glasspeb/domains/glasspebbles.co.uk/public_html/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgra
 
SimpleHelixcom
Enthusiast
 
Avatar
Total Posts:  906
Joined:  2007-08-31
Huntsville, AL
 

I can confirm this fix does the trick!

Thanks advocat!

p.s.
lets hope for an immediate updated version for the official fix by Varien

 
Magento Community Magento Community
Magento Community
Magento Community
 
hydra
Guru
 
Avatar
Total Posts:  378
Joined:  2008-08-26
Amsterdam
 

Yes it works for me to.
Thank you very much Advocat

Ronald.

 
Magento Community Magento Community
Magento Community
Magento Community
 
PaginasWebdotPE
Member
 
Avatar
Total Posts:  46
Joined:  2008-10-22
Lima, Peru - Miami, USA
 

hello, sorry for my ignorance, in which file do I have to modify that function getAttributeTable(), and the path please
And just to be sure before mess it up again, after changing that piece of code and cleaning the cache it will work?, i dont know php, so i actually don’t know what this funtion does.
Thanks in advance for the help

 
Magento Community Magento Community
Magento Community
Magento Community
 
cadoworld
Jr. Member
 
Total Posts:  27
Joined:  2008-10-12
 

Thanks again to all, my website is now upgrade.

PS : If you do looking for a great webhosting, I really recommend simplehelix… never use better !!! fantastic customer service !

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jacques Jocelyn
Jr. Member
 
Total Posts:  11
Joined:  2008-08-16
 
RosesMiami.com - 30 December 2008 11:49 AM

hello, sorry for my ignorance, in which file do I have to modify that function getAttributeTable(), and the path please
And just to be sure before mess it up again, after changing that piece of code and cleaning the cache it will work?, i dont know php, so i actually don’t know what this funtion does.
Thanks in advance for the help

Hi,
You need to replace the existing code with the one provided by Advocate
the file to edit is app/code/core/Mage/Eav/Model/Entity/Setup.php

Jacques

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jacques Jocelyn
Jr. Member
 
Total Posts:  11
Joined:  2008-08-16
 

Thanks Advocat,
nice one. you seem to master Magento !
Excellent work. that solved the issue for me as well.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cadoworld
Jr. Member
 
Total Posts:  27
Joined:  2008-10-12
 

Hi,
Now my upgrade work BUT I can’t add new products .. I ve a new error

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`glasspeb_magento/magento_catalog_product_entity_varchar`, CONSTRAINT `FK_CATALOG_PRODUCT_ENTITY_VARCHAR_ATTRIBUTE` FOREIGN KEY (`attribute_id`) REFERENCES `r1soft_saved_database_wsrUOQ`.`mage)

Someone can help me!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
PaginasWebdotPE
Member
 
Avatar
Total Posts:  46
Joined:  2008-10-22
Lima, Peru - Miami, USA
 

Thanks advocat, it works, however, just to point out, you said replace a couple of lines, but my original function was this (after the upgrade):

public function getAttributeTable($entityTypeId, $id)
{
$entityKeyName = is_numeric($entityTypeId) ? ‘entity_type_id’ : ‘entity_type_code’;
$attributeKeyName = is_numeric($id) ? ‘attribute_id’ : ‘attribute_code’;

$select = $this->_conn->select()
->from(
array(’e’ => $this->getTable(’eav/entity_type’)),
array(’e.entity_table’)
)
->from(
array(’a’ => $this->getTable(’eav/attribute’)),
array(’a.backend_type’)
)
->where(’a.entity_type_id=e.entity_type_id’)
->where("e.{$entityKeyName}=?", $entityTypeId)
->where("a.{$attributeKeyName}=?", $id)
->limit(1);

$stmt = $this->_conn->query($select);

if ($stmt->rowCount() == 1) {
$row = $stmt->fetchObject();
$table = $this->getTable($row->entity_table);
if ($row->backend_type && $row->backend_type != ‘static’) {
$table .= ‘_’ . $row->backend_type;
}
return $table;
}
return false;
}

very different, i just replace the complete function, and is working now, much better than nothing, I hope i dot find any other bug, once again, thanks for your help

 
Magento Community Magento Community
Magento Community
Magento Community
 
PaginasWebdotPE
Member
 
Avatar
Total Posts:  46
Joined:  2008-10-22
Lima, Peru - Miami, USA
 

one more thing, I went to the connect manager again and there is more upgrades, from 1.2.0 to 1.2.0.1, im doing a backup now smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
kanixd
Jr. Member
 
Total Posts:  10
Joined:  2008-09-17
 

Edited: Had similar issue, but not exactly the same. Sorry!

 
Magento Community Magento Community
Magento Community
Magento Community
 
turbo1
Sr. Member
 
Avatar
Total Posts:  296
Joined:  2008-08-19
Los Angeles, CA
 

@cadoworld

I had something similar happen to me last night.  Do you have access to phpMyAdmin to look at your database? If so, are your tables set to MyISAM or InnoDB?

 
Magento Community Magento Community
Magento Community
Magento Community
 
cadoworld
Jr. Member
 
Total Posts:  27
Joined:  2008-10-12
 

@ turbo1
I ve got access to phpadmin (but I don’t really know how to use it).

most of them are innobd see attachment

File Attachments
phpadmin.pdf  (File Size: 1417KB - Downloads: 127)
 
Magento Community Magento Community
Magento Community
Magento Community
 
turbo1
Sr. Member
 
Avatar
Total Posts:  296
Joined:  2008-08-19
Los Angeles, CA
 

Ok, good, they’re the way they should be.  This is a long shot, but have you tried commenting out two lines as shown here:

catch (Exception $e){
// echo “<pre>”.print_r($e,1)."</pre>";
// throw Mage::exception(’Mage_Core’, Mage::helper(’core’)->__(’Error in file: “%s” - %s’, $sqlFile, $e->getMessage()));
}

in app/code/core/Mage/Core/Model/Resource/Setup.php

It’s a sloppy way to fix things, but it may get you temporary access.

 
Magento Community Magento Community
Magento Community
Magento Community
 
cadoworld
Jr. Member
 
Total Posts:  27
Joined:  2008-10-12
 

Hi,
Unfortunately it doesn’t change anything ;-(

 
Magento Community Magento Community
Magento Community
Magento Community
 
turbo1
Sr. Member
 
Avatar
Total Posts:  296
Joined:  2008-08-19
Los Angeles, CA
 

That’s what I was afraid of, the same thing happened to me last night. I reverted back to 1.1.8 - do you have a backup you can go back to?  In all honesty, I think 1.2.x is the worst pile of crap ever released. Sorry for the harsh words Varien, but my God look at all these issues people are having.  I’ll be sticking with 1.1.8 until something stable is available.

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