2013-08-09 2 views
1

나는 모든 사람이 전에 게시 된 것 같은 질문이라고 생각 알지만 내가 아니라 카탈로그 나 카탈로그 제품 엔티티에 존재하는 모든 행을 제거 다른 답변 젠토 인덱스하는 오류 제품 평면 데이터

Product Flat Data index process unknown error: 
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation:   1452 Cannot add or update a child row: a f  oreign key constraint fails (`Riders`. <result 2 when explaining filename '#sql-634_21fc81'>, CONSTRAINT `FK_CAT_PRD_FLAT_1_ENTT_ID  _CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`enti)' in /home/.sites/143/site2/web/lib/Ze   nd/Db/Statement/Pdo.php:228 
Stack trace: 
#0 /home/.sites/143/site2/web/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement- >execute(Array) 
#1 /home/.sites/143/site2/web/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array) 
#2 /home/.sites/143/site2/web/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array) 
#3 /home/.sites/143/site2/web/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array) 
#4 /home/.sites/143/site2/web/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('ALTER TABLE `ca...', Arr  ay) 
#5 /home/.sites/143/site2/web/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('ALTER TABLE `ca...',  Array) 
#6 /home/.sites/143/site2/web/lib/Varien/Db/Adapter/Pdo/Mysql.php(340): Varien_Db_Adapter_Pdo_Mysql->query('ALTER TABLE `ca...') 
#7 /home/.sites/143/site2/web/lib/Varien/Db/Adapter/Pdo/Mysql.php(2569): Varien_Db_Adapter_Pdo_Mysql->raw_query('ALTER TABLE `ca..  .') 
#8 /home/.sites/143/site2/web/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.p hp(816): Varien_Db_Adapter_Pdo_Mysql  ->addForeignKey('FK_CAT_PRD_FLAT...', 'catalog_product...', 'entity_id', 'catalog_product...', 'entity_id', 'CASCADE', 'CASCADE') 
#9 /home/.sites/143/site2/web/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.p hp(1390): Mage_Catalog_Model_Resourc  e_Product_Flat_Indexer->prepareFlatTable(1) 
#10 /home/.sites/143/site2/web/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php(296): Mage_Catalog_Model_Resource_Product  _Flat_Indexer->reindexAll() 
#11 /home/.sites/143/site2/web/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php(336): Mage_Catalog_Model_Product_Flat_Ind  exer->reindexAll() 
#12 /home/.sites/143/site2/web/app/code/core/Mage/Index/Model/Process.php(209): Mage_Catalog_Model_Product_Indexer_Flat->reindexAl  l() 
#13 /home/.sites/143/site2/web/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll() 
#14 /home/.sites/143/site2/web/shell/indexer.php(158): Mage_Index_Model_Process->reindexEverything() 
#15 /home/.sites/143/site2/web/shell/indexer.php(198): Mage_Shell_Compiler->run() 
#16 {main} 

을 시도 카테고리 제품. 데이터베이스 복구 도구도 실행했습니다. 내 데이터베이스가 손상되지 않았다고합니다. 나는 또한 테이블을 자르려고했다. 그 중 누구도 문제를 해결하지 못했습니다.

현재 내 catalog_product_flat 테이블이 비어 있습니다.

다른 어떤 시도를해야할지 모르겠지만 프로젝트의 다음 부분으로 이동하려면이 오류를 해결해야합니다. 나는 처음부터 기꺼이 시작할 것입니다.하지만 이것은 실제 제품과 주문이 진행되는 라이브 사이트입니다.

모든 조언이나 도움을 주시면 매우 감사하겠습니다.

+0

이것은 특정 외래 키 제약 조건이 실패했다는 것을 알려줍니다. 쿼리 로깅을 활성화하여 수행중인 쿼리를이 제약 조건이 무엇인지 확인하십시오. 당신은 테이블 중 하나가 어디에 하나가 있어야 행이없는 것을 발견 할 것이다 ... – RichardBernards

+0

예 내 카탈로그 제품 평면 테이블에 행이 없다는 것 이외에 나는 전혀 모른다. – TwoEyedDan

+0

테이블 http : // www를 수정 해 보라. .magentocommerce.com/wiki/1 _-_ installation_and_configuration/db-repair-tool –

답변

4
  1. 자르기 :

    • catalog_product_flat_1
    • catalog_product_flat_2
    • catalog_product_flat_3
    • catalog_product_flat_cl
  2. 색인화 수동 : php /yoursite/shell/indexer.php --reindexall

인사말.

+0

건배! 그것은 나를 위해 일했다! – hesselbom

4
  1. 폴더를
  2. 실행을 쉘, 터미널 (명령 행)에서 catalog_product_flat_
  3. 로 시작하는 모든 테이블을 드롭 CD를 어떤 당신이 VAR/잠금 장치에있는 잠금/데이터베이스에서
  4. 삭제 php indexer.php --reindexall
+0

이 다음, 내 베이컨 저장했습니다. 또는 채식주의 자라면 쇠고기 소시지. 고맙습니다! – mickburkejnr