看来更新magento真的很难:)
我有 magento 1.4.1.1,我想将其更新到最新的 magento 1.4.2。
我遵循本指南: How to upgrade magento 1.4 1.1 to 1.7.0.2
我当然做什么: - 禁用并清除缓存 - 清除 session - 更新前禁用所有扩展 - 备份备份备份:D
当我从 1.4.1.1 更新到 1.4.2 时,我触发主页来进行 mysql 更改。这就是问题开始的地方。
我收到此错误:
a:5:{i:0;s:435:"Error in file: "/var/www/vhosts/dev/docs/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-1.4.0.20-1.4.0.21.php" - SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`dev`.<result 2 when explaining filename '#sql-20eb_3d66'>, CONSTRAINT `FK_PRODUCT_ORDERED_AGGREGATED_MONTHLY_PRODUCT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entit)";i:1;s:974:"#0 /var/www/vhosts/dev/docs/app/code/core/Mage/Core/Model/Resource/Setup.php(390): Mage::exception('Mage_Core', 'Error in file: ...')
我也尝试过直接升级到 1.7,这导致了许多其他类似的错误。我当然可以注释掉所有导致问题的部分,但我认为这并不明智:)
您知道我可以做什么来避免/修复这些错误吗?
非常感谢:)
问候
最佳答案
是的,升级 Magento 几乎从来都不是顺利的。
要诊断此特定问题,您必须比较 sales_bestsellers_aggreated_monthly
.product_id
和 catalog_product_entity
.entity_id
字段。
您可以在我专门讨论此主题的文章中找到有关导致此问题的原因的更多详细信息以及解决方案。
英文:How 3rd Party Extensions Can Ruin Your Magento Upgrade
德语:Wie Externe Extensions Dein Magento-Upgrade Ruinieren Können
关于upgrade - Magento 1.4.1.1 -> 1.7 升级 : foreign key constraint fails,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13673922/