php-未找到Magento列:1054’order子句’中的未知列’cat_index_position’
作者:互联网
我收到以下错误,并且我不知道如何解决此错误,因为我是magento的新手.如果有一些错误格式的说明,它也对我有帮助.我无法解决此问题的主要原因是因为我一开始不了解此错误.
a:5:{i:0;s:638:"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'cat_index_position' in 'order clause', query was: SELECT DISTINCT `e`.`attribute_set_id` FROM `catalog_product_flat_11` AS `e`
INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=11 AND cat_index.visibility IN(2, 4) AND cat_index.category_id = '393' AND cat_index.is_parent=1
INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 ORDER BY `cat_index_position` ASC, `cat_index`.`position` ASC LIMIT 12";i:1;s:4448:"#0 /home1/poojakit/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home1/poojakit/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home1/poojakit/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /home1/poojakit/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT DISTINCT...', Array)
#4 /home1/poojakit/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('SELECT DISTINCT...', Array)
#5 /home1/poojakit/public_html/lib/Zend/Db/Adapter/Abstract.php(794): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#6 /home1/poojakit/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php(1096): Zend_Db_Adapter_Abstract->fetchCol(Object(Varien_Db_Select))
#7 /home1/poojakit/public_html/app/code/core/Mage/Catalog/Model/Layer.php(290): Mage_Catalog_Model_Resource_Product_Collection->getSetIds()
#8 /home1/poojakit/public_html/app/code/core/Mage/Catalog/Model/Layer.php(220): Mage_Catalog_Model_Layer->_getSetIds()
#9 /home1/poojakit/public_html/app/code/core/Mage/Catalog/Block/Layer/View.php(163): Mage_Catalog_Model_Layer->getFilterableAttributes()
#10 /home1/poojakit/public_html/app/code/core/Mage/Catalog/Block/Layer/View.php(122): Mage_Catalog_Block_Layer_View->_getFilterableAttributes()
#11 /home1/poojakit/public_html/app/code/core/Mage/Core/Block/Abstract.php(293): Mage_Catalog_Block_Layer_View->_prepareLayout()
#12 /home1/poojakit/public_html/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#13 /home1/poojakit/public_html/app/code/local/MGS/Mpanel/Helper/Data.php(3267): Mage_Core_Model_Layout->createBlock('catalog/layer_v...')
#14 /home1/poojakit/public_html/app/design/frontend/mgstheme/default/template/mgs/mpanel/template/layout/category/right.phtml(7): MGS_Mpanel_Helper_Data->renderContent('218')
#15 /home1/poojakit/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home1/poojakit...')
#16 /home1/poojakit/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/mgsthe...')
#17 /home1/poojakit/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#18 /home1/poojakit/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#19 /home1/poojakit/public_html/app/code/local/MGS/Mpanel/Helper/Data.php(3091): Mage_Core_Block_Abstract->toHtml()
#20 /home1/poojakit/public_html/app/design/frontend/mgstheme/cetus/template/page/2columns-right.phtml(106): MGS_Mpanel_Helper_Data->getCategoryRight()
#21 /home1/poojakit/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home1/poojakit...')
#22 /home1/poojakit/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/mgsthe...')
#23 /home1/poojakit/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#24 /home1/poojakit/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#25 /home1/poojakit/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#26 /home1/poojakit/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#27 /home1/poojakit/public_html/app/code/local/MGS/Mpanel/controllers/Catalog/CategoryController.php(143): Mage_Core_Controller_Varien_Action->renderLayout()
#28 /home1/poojakit/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): MGS_Mpanel_Catalog_CategoryController->viewAction()
#29 /home1/poojakit/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#30 /home1/poojakit/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#31 /home1/poojakit/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#32 /home1/poojakit/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#33 /home1/poojakit/public_html/index.php(88): Mage::run('', 'store')
#34 {main}";s:3:"url";s:48:"/index.php/poojakits/pooja-items/pooja-kits.html";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:2:"en";}
解决方法:
似乎这是Magento错误,当启用“平面类别”和/或“产品”并且一个块调用产品集合的addAttributeToSort()时发生. “ order by”子句中的列应为cat_index.position而不是cat_index_position.
我发现this extension声称可以解决问题,尽管我自己尚未测试过.
标签:magento-1-9,magento,zend-framework,mysql,php 来源: https://codeday.me/bug/20191118/2027693.html