Magento 重建索引 + 目录页面问题

Magento Reindexing + Catalog page issue

我是 magento 的新开发者,我遇到了这些我无法解决的问题,我认为这些问题是相互关联的。 首先,当尝试重新索引目录 url 重写时,我收到一条错误消息 "An error occurred while saving the URL rewrite" 我在网上尝试了很多建议来解决这个问题(包括截断整个 core_url_rewrite),但我一直无法解决这个问题。

另外,在某些类别页面中,我得到了一个 "There has been an error processing your request" 页面,该页面嵌入到应列出产品的位置。然而,这只是某些类别页面的问题(主要是 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";}

任何guidance/help关于问题或在哪里寻找的信息都将不胜感激。

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

据我所知,您在使用 flat 时遇到了一些问题。首先尝试以下步骤:

  1. 备份你的数据库
  2. 截断 catalog_product_flat_* 个表
  3. 重建索引catalog_product_flat

upd.1

  • 尝试禁用 flat 并重现所描述的问题。
  • 尝试确定是哪个产品的原因和问题。查找类别 最少数量的产品。创建测试类别并分配这些 产品一一就可以了。尝试定义导致问题的产品。
  • 从 post 顶部执行查询的结果是什么?