2012-05-17 74 views
1

我獲得以下錯誤:得到錯誤,同時升級到Magento的1.7

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

我有Magento的1.4版本,首先我成功升級爲1.6.2,但是當我試圖升級到1.7,我想出了上述錯誤。

請幫

回答

0

你可以試試這個解決方案:

  1. 定位表eav_attribute在phpMyAdmin,這是關係到catalog_eav_attribute。 位於表eav_attribute中的列position並丟棄它。

  2. 全部清除緩存和重新索引的所有數據

  3. 現在訪問頭版。現在,你可能會得到一個新的錯誤:

SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘main_table.include_in_menu’ in ‘where clause’

  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-mage nto-1-6-1-to-1-7-0-using-connect-manager/

上述解決方案基於我自己的經驗。

+0

永遠不要編輯核心文件。 – Ashfame