簡體   English   中英

應用補丁6788后Magento Intenso主題重新索引錯誤

[英]Magento Intenso Theme reindex error after applying patch 6788

我安裝了Intenso Theme的Magento,最近他們發布了一個新補丁,該補丁打破了很多東西。 補丁程序編號6788。

當我嘗試為Intenso Theme SEO索引重新編制索引時,它將引發錯誤。 錯誤日志如下:

2015-10-29T01:19:26+00:00 DEBUG (7): Exception message: SQLSTATE[42S22]: Column not found: 1054 Unknown column '`main_table`.`frontend_input`' in 'where clause', query was: SELECT `main_table`.*, `additional_table`.* FROM `eav_attribute` AS `main_table`
 INNER JOIN `catalog_eav_attribute` AS `additional_table` ON additional_table.attribute_id = main_table.attribute_id WHERE (`main_table`.`entity_type_id` = '4') AND (```main_table```.```frontend_input``` IN('select', 'multiselect'))
Trace: #0 /var/www/html/magento/includes/src/Varien_Db_Statement_Pdo_Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /var/www/html/magento/includes/src/__default.php(84622): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /var/www/html/magento/includes/src/__default.php(73947): Zend_Db_Statement->execute(Array)
#3 /var/www/html/magento/includes/src/__default.php(74990): Zend_Db_Adapter_Abstract->query('SELECT `main_ta...', Array)
#4 /var/www/html/magento/includes/src/__default.php(75850): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#5 /var/www/html/magento/includes/src/__default.php(74204): Varien_Db_Adapter_Pdo_Mysql->query('SELECT `main_ta...', Array)
#6 /var/www/html/magento/includes/src/__default.php(32544): Zend_Db_Adapter_Abstract->fetchAll('SELECT `main_ta...', Array)
#7 /var/www/html/magento/includes/src/__default.php(33170): Varien_Data_Collection_Db->_fetchAll('SELECT `main_ta...', Array)
#8 /var/www/html/magento/includes/src/__default.php(32376): Mage_Core_Model_Resource_Db_Collection_Abstract->getData()
#9 /var/www/html/magento/includes/src/__default.php(31729): Varien_Data_Collection_Db->load()
#10 /var/www/html/magento/includes/src/Itactica_LayeredNavigation_Model_Resource_Indexer_Attribute.php(49): Varien_Data_Collection->getIterator()
#11 /var/www/html/magento/includes/src/Itactica_LayeredNavigation_Model_Resource_Indexer_Attribute.php(33): Itactica_LayeredNavigation_Model_Resource_Indexer_Attribute->reindexSeoUrlKeys()
#12 /var/www/html/magento/includes/src/Mage_Index_Model_Indexer_Abstract.php(143): Itactica_LayeredNavigation_Model_Resource_Indexer_Attribute->reindexAll()
#13 /var/www/html/magento/includes/src/Mage_Index_Model_Process.php(212): Mage_I
#14 /var/www/html/magento/includes/src/Mage_Index_Model_Process.php(260): Mage_I
#15 /var/www/html/magento/app/code/core/Mage/Index/controllers/Adminhtml/Process
#16 /var/www/html/magento/includes/src/__default.php(419): Mage_Index_Adminhtml_
#17 /var/www/html/magento/includes/src/__default.php(18922): Mage_Core_Controlle
#18 /var/www/html/magento/includes/src/__default.php(18452): Mage_Core_Controlle
#19 /var/www/html/magento/includes/src/__default.php(21292): Mage_Core_Controlle
#20 /var/www/html/magento/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#21 /var/www/html/magento/index.php(87): Mage::run('', 'store')
#22 {main}

似乎無法正確建立查詢。 但是我不知道構建查詢的代碼在哪里,有人可以指出我嗎?

Intenso 1.9.2.2和SUPEE-6788補丁的更新現已推出。

可以通過修改以下文件來解決索引器問題: app/code/local/Itactica/LayeredNavigation/Model/Resource/Indexer/Attribute.php

修改此功能:

protected function _getAttributes($attributeId = null)
{
    $collection = Mage::getSingleton('eav/config')
        ->getEntityType(Mage_Catalog_Model_Product::ENTITY)
        ->getAttributeCollection()
        ->addFieldToFilter('`main_table`.`frontend_input`', array('in' => array('select', 'multiselect')));
    if (!empty($attributeId)) {
        $collection->addFieldToFilter('`main_table`.`attribute_id`', $attributeId);
    }
    return $collection;
}

對此:

protected function _getAttributes($attributeId = null)
{
    $collection = Mage::getSingleton('eav/config')
        ->getEntityType(Mage_Catalog_Model_Product::ENTITY)
        ->getAttributeCollection()
        ->addFieldToFilter('frontend_input', array('in' => array('select', 'multiselect')));
    if (!empty($attributeId)) {
        $collection->addFieldToFilter('attribute_id', $attributeId);
    }
    return $collection;
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM