1

我收到以下错误:

SQLSTATE[23000]: Integrity constraint violation: 1052 Column ‘position’ in order clause is ambiguous

我有 Magento 1.4 版本,首先我成功将其升级到 1.6.2,但是当我尝试将其升级到 1.7 时,我想出了上述错误。

请帮忙

4

1 回答 1

0

你可以试试这个解决方案:

  1. 在 phpmyadmin 中找到eav_attributecatalog_eav_attribute. position在表中定位列eav_attribute并将其删除。

  2. 清除所有缓存并重新索引所有数据

  3. 现在访问首页。现在您可能会收到一个新错误:

SQLSTATE [42S22]:未找到列:1054 'where 子句'中的未知列'main_table.include_in_menu'</p>

  1. 找到并打开文件app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php

注释掉以下行:267

->where(‘main_table.is_active = ?’, ’1′)
// ->where(‘main_table.include_in_menu = ?’, ’1′)
->order(‘main_table.position’);

您可以在以下位置找到分步指南:expertmagentodevelopers[dot]com/blog/how-to-upgrade-from-magento-1-6-1-to-1-7-0-using-connect-manager/

上述解决方案是基于我自己的经验。

于 2012-05-17T05:22:46.910 回答