久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Magento 1.6.2 不能重新索引產品平面數據

Magento 1.6.2 cant not reindex product flat data(Magento 1.6.2 不能重新索引產品平面數據)
本文介紹了Magento 1.6.2 不能重新索引產品平面數據的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我們的 magento 1.6.2 不能重新索引產品平面數據.它有時還會顯示重新索引過程出現問題".

我從其他用戶的經驗中嘗試了許多解決方案.沒有結果.我們進口了大宗產品,但我們不確定這是重新索引問題的原因.

理想的解決方案是什么?

這是我在shell中使用的命令:

php/usr/local/lsws/fcgi-bin/lsphp5/home/user/domains/my domain../public_html/shell/indexer.php

這是異常日志中的錯誤

2012-08-09T14:55:43+00:00 DEBUG (7):異常消息:SQLSTATE[23000]:完整性約束違規:1452無法添加或更新子行:外鍵約束失敗(`galagearbox/#sql-1662_1fc419`,約束`FK_CAT_PRD_FLAT_4_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_TEELE`) ON CA D跟蹤:#0/home/corecolu/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)#1/home/corecolu/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)#2/home/corecolu/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)#3/home/corecolu/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)#4/home/corecolu/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)#5/home/corecolu/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)#6/home/corecolu/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(327): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')#7/home/corecolu/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(2548): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca...')#8/home/corecolu/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(816): Varien_Db_Adapter_Pdo_Mysql->addForeignKey('FK_CAT_PRD_FLAT...', 'catalog_product...', 'entity_id', 'catalog_product...', 'entity_id', 'CASCADE', 'CASCADE')#9/home/corecolu/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(1390): Mage_Catalog_Model_Resource_Product_Flat_Indexer->prepareFlatTable(4)#10/home/corecolu/public_html/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(296): Mage_Catalog_Model_Resource_Product_Flat_Indexer->reindexAll()#11/home/corecolu/public_html/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(336): Mage_Catalog_Model_Product_Flat_Indexer->reindexAll()#12/home/corecolu/public_html/app/code/core/Mage/Index/Model/Process.php(207): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()#13/home/corecolu/public_html/app/code/core/Mage/Index/Model/Process.php(253): Mage_Index_Model_Process->reindexAll()#14/home/corecolu/public_html/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()#15/home/corecolu/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()#16/home/corecolu/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')#17/home/corecolu/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))#18/home/corecolu/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()#19/home/corecolu/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)#20/home/corecolu/public_html/index.php(83): Mage::run('', 'store')#21 {主要}

解決方案

在 Magento 中重新索引錯誤可能有很多原因,所以恐怕永遠不會有一個理想"的解決方案涵蓋所有可能的錯誤.

由于您發布了非技術性錯誤消息,我猜您已經嘗試使用管理后端重新索引產品平面數據并在那里看到錯誤消息.

我建議再次嘗試重新索引,但這次使用 shell/indexer.php:

/usr/bin/php -f/abs/path/to/shell/indexer.php -- --reindex catalog_product_flat

這樣,如果重新索引失敗,您將獲得更有意義的技術錯誤消息.

這是一個列表,顯示了哪個參數用于哪個索引:

catalog_product_attribute 產品屬性catalog_product_price 產品價格catalog_url 目錄 URL 重寫catalog_product_flat 產品平面數據catalog_category_flat 類別平面數據catalog_category_product 分類產品catalogsearch_fulltext 目錄搜索索引cataloginventory_stock 庫存狀態tag_summary 標簽聚合數據

更新

您在帖子中添加的例外表明,

catalog_product_flat_4.entity_id

catalog_product_entity.entity_id

發現已損壞.

通常這意味著某些記錄在 catalog_product_entity.entity_id 字段中包含 null,它們應該包含現有的 entity_id代碼>s.

在嘗試解決此問題之前,請先備份您的數據庫.

現在,要查找損壞的記錄,請使用以下命令查詢您的數據庫:

SELECTa.entity_id從catalog_product_flat_4 作為左加入catalog_product_entity AS b ON a.entity_id = b.entity_id在哪里ISNULL(b.entity_id)

本次查詢找到的entity_idcatalog_product_flat_4表中的entity_id,已損壞,需要刪除.>

刪除catalog_product_flat_4中的相應記錄,然后再次嘗試重新索引.

Our magento 1.6.2 cant not reindex product flat data. It also sometimes shows 'There was a problem with reindexing process.'

I tried many solutions from the experience of other users. No result. We imported bulk products but we are not sure it's the cause of reindexing problem.

What could be the ideal solutions?

This is the command i used in shell:

php /usr/local/lsws/fcgi-bin/lsphp5 /home/user/domains/my domain../public_html/shell/indexer.php 

This is the error from exception.log

2012-08-09T14:55:43+00:00 DEBUG (7): Exception message: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`galagearbox/#sql-1662_1fc419`, CONSTRAINT `FK_CAT_PRD_FLAT_4_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCA)
Trace: #0 /home/corecolu/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /home/corecolu/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /home/corecolu/public_html/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /home/corecolu/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /home/corecolu/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Array)
#5 /home/corecolu/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(389): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...', Array)
#6 /home/corecolu/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(327): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...')
#7 /home/corecolu/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(2548): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca...')
#8 /home/corecolu/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(816): Varien_Db_Adapter_Pdo_Mysql->addForeignKey('FK_CAT_PRD_FLAT...', 'catalog_product...', 'entity_id', 'catalog_product...', 'entity_id', 'CASCADE', 'CASCADE')
#9 /home/corecolu/public_html/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php(1390): Mage_Catalog_Model_Resource_Product_Flat_Indexer->prepareFlatTable(4)
#10 /home/corecolu/public_html/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(296): Mage_Catalog_Model_Resource_Product_Flat_Indexer->reindexAll()
#11 /home/corecolu/public_html/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(336): Mage_Catalog_Model_Product_Flat_Indexer->reindexAll()
#12 /home/corecolu/public_html/app/code/core/Mage/Index/Model/Process.php(207): Mage_Catalog_Model_Product_Indexer_Flat->reindexAll()
#13 /home/corecolu/public_html/app/code/core/Mage/Index/Model/Process.php(253): Mage_Index_Model_Process->reindexAll()
#14 /home/corecolu/public_html/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#15 /home/corecolu/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#16 /home/corecolu/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#17 /home/corecolu/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#18 /home/corecolu/public_html/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#19 /home/corecolu/public_html/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#20 /home/corecolu/public_html/index.php(83): Mage::run('', 'store')
#21 {main}

解決方案

Reindexing errors in Magento can have many reasons, so I'm afraid there never will be an "ideal" solution covering all possible errors.

Since you've posted a non-technical error message, I guess you've tried to reindex the product flat data using the admin backend and saw the error message there.

I'd recommend to try to reindex again, but using the shell/indexer.php this time:

/usr/bin/php -f /abs/path/to/shell/indexer.php -- --reindex catalog_product_flat

This way you'll get more meaningful technical error messages, if reindexing fails.

Here's a list that shows which parameter to use for which index:

catalog_product_attribute     Product Attributes
catalog_product_price         Product Prices
catalog_url                   Catalog URL Rewrites
catalog_product_flat          Product Flat Data
catalog_category_flat         Category Flat Data
catalog_category_product      Category Products
catalogsearch_fulltext        Catalog Search Index
cataloginventory_stock        Stock Status
tag_summary                   Tag Aggregation Data

UPDATE

The exception you've added to your post tells, that the referential integrity between

catalog_product_flat_4.entity_id

and

catalog_product_entity.entity_id

was found being corrupted.

Usually this means some record(s) contain(s) null in the field catalog_product_entity.entity_id, where they are expected to contain existing entity_ids.

Before trying to fix this, please backup your database first.

Now, to find the corrupted record(s), query your database with:

SELECT
    a.entity_id
FROM
    catalog_product_flat_4 AS a
LEFT JOIN
    catalog_product_entity AS b ON a.entity_id = b.entity_id
WHERE
    ISNULL(b.entity_id)

The entity_ids found by this query are entity_ids in the table catalog_product_flat_4, which are corrupted and need to be deleted.

Delete the appropriate records in catalog_product_flat_4, and then try to reindex again.

這篇關于Magento 1.6.2 不能重新索引產品平面數據的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Joining 2 tables in SELECT(MYSQL/PHP)(在 SELECT(MYSQL/PHP) 中加入 2 個表)
How to make lt;option selected=quot;selectedquot;gt; set by MySQL and PHP?(如何使lt;option selected=“selectedgt;由 MySQL 和 PHP 設置?)
Auto populate a select box using an array in PHP(使用 PHP 中的數組自動填充選擇框)
PHP SQL SELECT where like search item with multiple words(PHP SQL SELECT where like search item with multiple words)
json_encode produce JSON_ERROR_UTF8 from MSSQL-SELECT(json_encode 從 MSSQL-SELECT 產生 JSON_ERROR_UTF8)
MySQL ORDER BY rand(), name ASC(MySQL ORDER BY rand(),名稱 ASC)
主站蜘蛛池模板: 精品一区二区三区在线视频 | 毛片网络 | 国产一区影院 | 日韩av成人 | 午夜影院视频在线观看 | 天天色天天射天天干 | 天天爽夜夜操 | 欧美黑人体内she精在线观看 | 久久久久国产精品午夜一区 | 在线视频一区二区三区 | 国产网站在线 | 久久久www成人免费精品 | а天堂中文最新一区二区三区 | 色天天综合 | 精品久久久久久久久久久久久久 | www.伊人.com | 在线免费观看一区二区 | 嫩草国产 | 久久一二 | 范冰冰一级做a爰片久久毛片 | 久久久久久国产一区二区三区 | 日韩视频在线一区 | 亚洲一区二区三区在线 | 欧美一区二区在线观看 | 午夜精品久久久久久久久久久久 | 亚洲精品2 | 成人高清视频在线观看 | 偷拍亚洲色图 | 中文字幕免费视频 | 99re在线视频 | 亚洲一区二区三区四区五区中文 | 在线视频91 | 欧美一区二区三区四区五区无卡码 | 国产成人精品久久二区二区 | 久久久夜| 波多野结衣在线观看一区二区三区 | 亚洲一区二区中文字幕在线观看 | h片免费看 | 欧美精品一二区 | 亚洲精品视频三区 | 国产乱码久久久久久 |