Magento重新编制索引+目录页面问题


Magento Reindexing + Catalog page issue

我是magento的新开发人员,我有这些问题无法解决,我认为这些问题是联系在一起的。首先,当试图重新索引目录url重写时,我收到一个错误,说"保存url重写时出错"我在网上尝试了很多建议来解决这个问题(包括截断整个core_url_rewrite),但我一直无法解决这个问题。

此外,在一些类别页面中,我收到了一个"处理您的请求时出错"页面,该页面嵌入了产品应该列出的位置。然而,这只是一些类别页面的问题(大多数是2级,除了其中一个仍然正常工作,还有一个3级类别页面)。错误日志如下:

a:5:{i:0;s:1407:"SELECT 1 AS `status`, `e`.`entity_id`, `e`.`type_id`, `e`.`attribute_set_id`, `cat_index`.`position` AS `cat_index_position`, `e`.`name`, `e`.`short_description`, `e`.`price`, `e`.`special_price`, `e`.`special_from_date`, `e`.`special_to_date`, `e`.`small_image`, `e`.`thumbnail`, `e`.`news_from_date`, `e`.`news_to_date`, `e`.`url_key`, `e`.`required_options`, `e`.`image_label`, `e`.`small_image_label`, `e`.`thumbnail_label`, `e`.`msrp_enabled`, `e`.`msrp_display_actual_price_type`, `e`.`msrp`, `e`.`tax_class_id`, `e`.`price_type`, `e`.`weight_type`, `e`.`price_view`, `e`.`shipment_type`, `e`.`links_purchased_separately`, `e`.`links_exist`, `e`.`bss_weight`, `price_index`.`price`, `price_index`.`tax_class_id`, `price_index`.`final_price`, IF(price_index.tier_price IS NOT NULL, LEAST(price_index.min_price, price_index.tier_price), price_index.min_price) AS `minimal_price`, `price_index`.`min_price`, `price_index`.`max_price`, `price_index`.`tier_price` FROM `catalog_product_flat_1` AS `e`
 INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id=1 AND cat_index.visibility IN(2, 4) AND cat_index.category_id='434'
 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 `price_index`.`min_price` asc LIMIT 20
";i:1;s:5326:"#0 /home/pharmapost/magento/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/pharmapost/magento/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /home/pharmapost/magento/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /home/pharmapost/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT 1 AS `st...', Array)
#4 /home/pharmapost/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('SELECT 1 AS `st...', Array)
#5 /home/pharmapost/magento/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query('SELECT 1 AS `st...', Array)
#6 /home/pharmapost/magento/lib/Varien/Data/Collection/Db.php(734): Zend_Db_Adapter_Abstract->fetchAll('SELECT 1 AS `st...', Array)
#7 /home/pharmapost/magento/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1047): Varien_Data_Collection_Db->_fetchAll('SELECT 1 AS `st...')
#8 /home/pharmapost/magento/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false)
#9 /home/pharmapost/magento/app/code/core/Mage/Review/Model/Observer.php(78): Mage_Eav_Model_Entity_Collection_Abstract->load()
#10 /home/pharmapost/magento/app/code/core/Mage/Core/Model/App.php(1338): Mage_Review_Model_Observer->catalogBlockProductCollectionBeforeToHtml(Object(Varien_Event_Observer))
#11 /home/pharmapost/magento/app/code/core/Mage/Core/Model/App.php(1311): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Review_Model_Observer), 'catalogBlockPro...', Object(Varien_Event_Observer))
#12 /home/pharmapost/magento/app/Mage.php(447): Mage_Core_Model_App->dispatchEvent('catalog_block_p...', Array)
#13 /home/pharmapost/magento/app/code/core/Mage/Catalog/Block/Product/List.php(163): Mage::dispatchEvent('catalog_block_p...', Array)
#14 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Abstract.php(862): Mage_Catalog_Block_Product_List->_beforeToHtml()
#15 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#16 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('product_list', true)
#17 /home/pharmapost/magento/app/code/core/Mage/Catalog/Block/Category/View.php(85): Mage_Core_Block_Abstract->getChildHtml('product_list')
#18 /home/pharmapost/magento/app/design/frontend/pharmapost/default/template/easyspotlight/category/view.phtml(46): Mage_Catalog_Block_Category_View->getProductListHtml()
#19 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Template.php(241): include('/home/pharmapos...')
#20 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/pharma...')
#21 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#22 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#23 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#24 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Text_List->_toHtml()
#25 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Abstract.php(582): Mage_Core_Block_Abstract->toHtml()
#26 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Abstract.php(526): Mage_Core_Block_Abstract->_getChildHtml('content', true)
#27 /home/pharmapost/magento/app/design/frontend/pharmapost/default/template/page/2columns-left.phtml(48): Mage_Core_Block_Abstract->getChildHtml('content')
#28 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Template.php(241): include('/home/pharmapos...')
#29 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/pharma...')
#30 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#31 /home/pharmapost/magento/app/code/core/Mage/Core/Block/Abstract.php(863): Mage_Core_Block_Template->_toHtml()
#32 /home/pharmapost/magento/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#33 /home/pharmapost/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#34 /home/pharmapost/magento/app/code/core/Mage/Catalog/controllers/CategoryController.php(159): Mage_Core_Controller_Varien_Action->renderLayout()
#35 /home/pharmapost/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Catalog_CategoryController->viewAction()
#36 /home/pharmapost/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#37 /home/pharmapost/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#38 /home/pharmapost/magento/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#39 /home/pharmapost/magento/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#40 /home/pharmapost/magento/index.php(87): Mage::run('default', 'store')
#41 {main}";s:3:"url";s:47:"/catalog/category/view/s/natural-health/id/434/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

如有任何关于该问题的指导/帮助或在哪里查找,我们将不胜感激。

编辑1虽然重新索引平面表没有帮助,但禁用平面产品确实解决了问题,但有什么方法可以解决这个问题,让我启用平面产品吗?此外,我仍然无法重新索引目录url重写

据我所知,您对flat有一些问题。首先尝试以下步骤:

  1. 备份数据库
  2. 截断catalog_product_flat_*表
  3. 重新编制目录_产品_平面索引

更新版本1

  • 尝试禁用flat并重现所描述的问题
  • 尝试确定产品的原因和问题。使用查找类别产品数量最少。创建测试类别并分配一个接一个的产品。试着定义哪个产品会导致问题
  • 从你的帖子顶部执行查询的结果是什么