Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 3 of 3
Can’t initialize indexer process - Product Prices
 
webrgr
Jr. Member
 
Total Posts:  7
Joined:  2010-10-04
 
ogray - 21 May 2010 06:21 AM

Try this queries:

DELETE cpop.* FROM catalog_product_option_price AS cpop
INNER JOIN catalog_product_option 
AS cpo
ON cpo
.option_id cpop.option_id
WHERE
cpo
.type 'checkbox' OR
cpo.type 'radio' OR
cpo.type 'drop_down';

DELETE cpotp.* FROM catalog_product_option_type_price AS cpotp
INNER JOIN catalog_product_option_type_value 
AS cpotv
ON cpotv
.option_type_id cpotp.option_type_id
INNER JOIN catalog_product_option 
AS cpo
ON cpotv
.option_id cpo.option_id
WHERE
cpo
.type <> 'checkbox' AND
cpo.type <> 'radio' AND
cpo.type <> 'drop_down';
But don’t forget to BACKUP before executing!

After all day to find the solution response saved my life. Thanks for your input
smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
dltr_org
Sr. Member
 
Avatar
Total Posts:  167
Joined:  2008-09-12
rockdale, sydney, australia
 

its easy to fix, check this:

http://learntipsandtricks.com/blog/92/114/magento-index-management-Cannot-initialize-the-indexer-process

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jason Millward
Member
 
Total Posts:  59
Joined:  2008-05-03
 

I’m not entirely sure if teh 2 are related but i’m getting a 500 internal server error after running this

DELETE cpop.* FROM catalog_product_option_price AS cpop
INNER JOIN catalog_product_option AS cpo
ON cpo.option_id = cpop.option_id
WHERE
cpo.type = ‘checkbox’ OR
cpo.type = ‘radio’ OR
cpo.type = ‘drop_down’;

DELETE cpotp.* FROM catalog_product_option_type_price AS cpotp
INNER JOIN catalog_product_option_type_value AS cpotv
ON cpotv.option_type_id = cpotp.option_type_id
INNER JOIN catalog_product_option AS cpo
ON cpotv.option_id = cpo.option_id
WHERE
cpo.type <> ‘checkbox’ AND
cpo.type <> ‘radio’ AND
cpo.type <> ‘drop_down’;

Can anyone guide me in fixing this? I have a live site throwing an error and I need to fix this asap

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Stevan1978
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2009-04-22
Etten-leur
 

Hi Jason,

I don’t know if you ever solved it but here is the answer for the future.

The error “server 500” is a know issue.

This has to do with file permissions.

Resetting file permissions Magento

or

.htacces file in your root folder and/or Media folder.

Cheers,

Steve

 
Magento Community Magento Community
Magento Community
Magento Community
 
Stevan1978
Sr. Member
 
Avatar
Total Posts:  78
Joined:  2009-04-22
Etten-leur
 

Hmm,

Bubbleshooter… please stop spamming…

 
Magento Community Magento Community
Magento Community
Magento Community
 
kacu
Jr. Member
 
Total Posts:  9
Joined:  2009-10-23
 
adolmedia - 02 June 2010 06:49 AM

Hi everyone,

For peoples facing problem with Catalog product fulltext search re-indexing with error message

“Some problem with reindexing process.” or “Can’t initialize indexer process”,

please find below the fix.

Create a file called “search-reindex.php” inside your magento root folder and put the following code.

<?php
require_once 'app/Mage.php';
umask);
Mage :: app"default" );
Mage::log("Started Rebuilding Search Index At: " date("d/m/y h:i:s"));
$sql "truncate catalogsearch_fulltext;";
$mysqli Mage::getSingleton('core/resource')->getConnection('core_write');
$mysqli->query($sql);
$process Mage::getModel('index/process')->load(7);
$process->reindexAll();
Mage::log("Finished Rebuilding Search Index At: " date("d/m/y h:i:s"));

Then run this script by visiting www.yourdomain.com/search-reindex.php in your browser.

That’s it. It will now work like a charm.

Regards,
Rahman - AdolMedia

Hi,

it works not by me, should it helt also at Magento 1.6.1?

 
Magento Community Magento Community
Magento Community
Magento Community
 
sgarg7
Jr. Member
 
Total Posts:  4
Joined:  2012-06-21
 
ogray - 21 May 2010 06:21 AM

Try this queries:

DELETE cpop.* FROM catalog_product_option_price AS cpop
INNER JOIN catalog_product_option 
AS cpo
ON cpo
.option_id cpop.option_id
WHERE
cpo
.type 'checkbox' OR
cpo.type 'radio' OR
cpo.type 'drop_down';

DELETE cpotp.* FROM catalog_product_option_type_price AS cpotp
INNER JOIN catalog_product_option_type_value 
AS cpotv
ON cpotv
.option_type_id cpotp.option_type_id
INNER JOIN catalog_product_option 
AS cpo
ON cpotv
.option_id cpo.option_id
WHERE
cpo
.type <> 'checkbox' AND
cpo.type <> 'radio' AND
cpo.type <> 'drop_down';
But don’t forget to BACKUP before executing!

What was strange was that even if you set the index mode to manual, it reindexes all of them after saving a product leading to the error. (from stack trace)

I can’t believe this worked after 4 hours of trying everything. I tried:
1. deleting var/locks
2. deleting inside all folders in var
3. repairing the two tables in the query above

I’m more surprized since when I ran a select instead of the delete for the above queries, I got zero rows. So I searched for more ways. Finally I came back and ran the delete. THE QUERY DELETED NO ROWS!! And yet when I go back to magento admin, I find the second index in a “reindex required” state instead of the “processing” state it was stuck in. Reindex and done! Works like magic. Only thing I still don’t know what was wrong.
Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
jaredosborne
Jr. Member
 
Total Posts:  2
Joined:  2013-05-29
 

I’m a bit new to Magento, and have been having this problem, but when I put this query in I get:

#1054 - Unknown column ‘‘checkbox’’ in ‘where clause’

If I delete the checkbox part of the query I get the same with the next one etc.

(I had to add mage_ to the start of the DB names as that how our DB is configured)

Have i missed something or is there any other solutions? (the problem is with our product prices index)

Thanks!

Jared.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Shirokovskiy
Jr. Member
 
Avatar
Total Posts:  28
Joined:  2010-10-21
Russian Federation
 

Hello all,

I’ve got the same problem.
And nothing could help me (if to say about advices above).

But, doing indexer.php in CLI, I found error about MySQL permissions…
then I fixed some of them, and it had help me.

(MySQL permissions screenshot)

 
Magento Community Magento Community
Magento Community
Magento Community
 
spap13
Jr. Member
 
Total Posts:  1
Joined:  2013-07-04
 

Hi,

I recently updated from 1.4.0.1 to 1.8.1.0. Now I get a “Cannot initialize the indexer process.” error for Product Prices and Category Products. I am a bit new to Magento, I ‘ve read all these posts above and tried some of the solutions but nothing seems to work… here is the output from running indexer.php --reindexall. Can anyone help me fixing this? thanks in advance

Product Prices index process unknown error:
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint vio
lation: 1452 Cannot add or update a child row: a foreign key constraint fails (`
hho_db`.`catalog_product_index_tier_price`, CONSTRAINT `FK_CAT_PRD_IDX_TIER_PRIC
E_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `catalog_pr
oduct_entity` (`entity_id`) ON )' 
in E:\Work\Development\workspaces\current_proj
ects\domainname\lib\Zend\Db\Statement\Pdo
.php:228
Stack trace
:
#0 E:\Work\Development\workspaces\current_projects\domainname\lib\Zend\Db\State
ment\Pdo.php(228): PDOStatement->execute(Array)
#1 E:\Work\Development\workspaces\current_projects\domainname\lib\Varien\Db\Sta
tement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Zen
d\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 E:\Work\Development\workspaces\current_projects\domainname\lib\Zend\Db\Adapt
er\Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 E:\Work\Development\workspaces\current_projects\domainname\lib\Zend\Db\Adapt
er\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...',
Array)
#5 E:\Work\Development\workspaces\current_projects\domainname\lib\Varien\Db\Ada
pter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...
'
, Array)
#6 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Catalog\Model\Resource\Product\Indexer\Price.php(455): Varien_Db_Adapter_Pdo_M
ysql
->query('INSERT INTO `ca...')
#7 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Catalog\Model\Resource\Product\Indexer\Price.php(379): Mage_Catalog_Model_Reso
urce_Product_Indexer_Price
->_prepareTierPriceIndex()
#8 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Indexer\Abstract.php(143): Mage_Catalog_Model_Resource_Product_Ind
exer_Price
->reindexAll()
#9 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Ma
ge\Index\Model\Process.php(258): Mage_Index_Model_Process->reindexAll()
#11 E:\Work\Development\workspaces\current_projects\domainname\shell\indexer.ph
p(166): Mage_Index_Model_Process->reindexEverything()
#12 E:\Work\Development\workspaces\current_projects\domainname\shell\indexer.ph
p(212): Mage_Shell_Compiler->run()
#13 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Inte
grity constraint violation: 1452 Cannot add or update a child row: a foreign key
 constraint fails (`hho_db`.`catalog_product_index_tier_price`, CONSTRAINT `FK_C
AT_PRD_IDX_TIER_PRICE_ENTT_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) RE
FERENCES `catalog_product_entity` (`entity_id`) ON )' 
in E:\Work\Development\wor
kspaces\current_projects\domainname\lib\Zend\Db\Statement\Pdo
.php:234
Stack trace
:
#0 E:\Work\Development\workspaces\current_projects\domainname\lib\Varien\Db\Sta
tement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Zen
d\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 E:\Work\Development\workspaces\current_projects\domainname\lib\Zend\Db\Adapt
er\Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 E:\Work\Development\workspaces\current_projects\domainname\lib\Zend\Db\Adapt
er\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...',
Array)
#4 E:\Work\Development\workspaces\current_projects\domainname\lib\Varien\Db\Ada
pter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...
'
, Array)
#5 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Catalog\Model\Resource\Product\Indexer\Price.php(455): Varien_Db_Adapter_Pdo_M
ysql
->query('INSERT INTO `ca...')
#6 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Catalog\Model\Resource\Product\Indexer\Price.php(379): Mage_Catalog_Model_Reso
urce_Product_Indexer_Price
->_prepareTierPriceIndex()
#7 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Indexer\Abstract.php(143): Mage_Catalog_Model_Resource_Product_Ind
exer_Price
->reindexAll()
#8 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()
#9 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Process.php(258): Mage_Index_Model_Process->reindexAll()
#10 E:\Work\Development\workspaces\current_projects\domainname\shell\indexer.ph
p(166): Mage_Index_Model_Process->reindexEverything()
#11 E:\Work\Development\workspaces\current_projects\domainname\shell\indexer.ph
p(212): Mage_Shell_Compiler->run()
#12 {main}
Catalog URL Rewrites index was rebuilt successfully
Category Products index process unknown error
:
exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint vio
lation: 1452 Cannot add or update a child row: a foreign key constraint fails (`
hho_db`.`catalog_category_product_index`, CONSTRAINT `FK_CAT_CTGR_PRD_IDX_CTGR_I
D_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `catalog_categor
y_entity` (`entity_id`) ON DELE)' 
in E:\Work\Development\workspaces\current_proj
ects\domainname\lib\Zend\Db\Statement\Pdo
.php:228
Stack trace
:
#0 E:\Work\Development\workspaces\current_projects\domainname\lib\Zend\Db\State
ment\Pdo.php(228): PDOStatement->execute(Array)
#1 E:\Work\Development\workspaces\current_projects\domainname\lib\Varien\Db\Sta
tement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Zen
d\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 E:\Work\Development\workspaces\current_projects\domainname\lib\Zend\Db\Adapt
er\Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 E:\Work\Development\workspaces\current_projects\domainname\lib\Zend\Db\Adapt
er\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...',
Array)
#5 E:\Work\Development\workspaces\current_projects\domainname\lib\Varien\Db\Ada
pter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...
'
, Array)
#6 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Resource\Abstract.php(179): Varien_Db_Adapter_Pdo_Mysql->query('IN
SERT INTO `ca...'
)
#7 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Resource\Helper\Mysql4.php(48): Mage_Index_Model_Resource_Abstract
->insertFromSelect(Object(Varien_Db_Select), 'catalog_categor...', Array, false)

#8 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Resource\Abstract.php(153): Mage_Index_Model_Resource_Helper_Mysql
4
->insertData(Object(Mage_Catalog_Model_Resource_Category_Indexer_Product), Obje
ct
(Varien_Db_Select), 'catalog_categor...', Array, false)
#9 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Resource\Abstract.php(113): Mage_Index_Model_Resource_Abstract->in
sertFromTable
('catalog_categor...''catalog_categor...'false)
#10 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Ma
ge\Catalog\Model\Resource\Category\Indexer\Product.php(935): Mage_Index_Model_Re
source_Abstract
->syncData()
#11 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Ma
ge\Index\Model\Indexer\Abstract.php(143): Mage_Catalog_Model_Resource_Category_I
ndexer_Product
->reindexAll()
#12 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Ma
ge\Index\Model\Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()

#13 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Ma
ge\Index\Model\Process.php(258): Mage_Index_Model_Process->reindexAll()
#14 E:\Work\Development\workspaces\current_projects\domainname\shell\indexer.ph
p(166): Mage_Index_Model_Process->reindexEverything()
#15 E:\Work\Development\workspaces\current_projects\domainname\shell\indexer.ph
p(212): Mage_Shell_Compiler->run()
#16 {main}

Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[23000]: Inte
grity constraint violation: 1452 Cannot add or update a child row: a foreign key
 constraint fails (`hho_db`.`catalog_category_product_index`, CONSTRAINT `FK_CAT
_CTGR_PRD_IDX_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFEREN
CES `catalog_category_entity` (`entity_id`) ON DELE)' 
in E:\Work\Development\wor
kspaces\current_projects\domainname\lib\Zend\Db\Statement\Pdo
.php:234
Stack trace
:
#0 E:\Work\Development\workspaces\current_projects\domainname\lib\Varien\Db\Sta
tement\Pdo\Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Zen
d\Db\Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 E:\Work\Development\workspaces\current_projects\domainname\lib\Zend\Db\Adapt
er\Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 E:\Work\Development\workspaces\current_projects\domainname\lib\Zend\Db\Adapt
er\Pdo\Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...',
Array)
#4 E:\Work\Development\workspaces\current_projects\domainname\lib\Varien\Db\Ada
pter\Pdo\Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...
'
, Array)
#5 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Resource\Abstract.php(179): Varien_Db_Adapter_Pdo_Mysql->query('IN
SERT INTO `ca...'
)
#6 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Resource\Helper\Mysql4.php(48): Mage_Index_Model_Resource_Abstract
->insertFromSelect(Object(Varien_Db_Select), 'catalog_categor...', Array, false)

#7 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Resource\Abstract.php(153): Mage_Index_Model_Resource_Helper_Mysql
4
->insertData(Object(Mage_Catalog_Model_Resource_Category_Indexer_Product), Obje
ct
(Varien_Db_Select), 'catalog_categor...', Array, false)
#8 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Index\Model\Resource\Abstract.php(113): Mage_Index_Model_Resource_Abstract->in
sertFromTable
('catalog_categor...''catalog_categor...'false)
#9 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Mag
e\Catalog\Model\Resource\Category\Indexer\Product.php(935): Mage_Index_Model_Res
ource_Abstract
->syncData()
#10 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Ma
ge\Index\Model\Indexer\Abstract.php(143): Mage_Catalog_Model_Resource_Category_I
ndexer_Product
->reindexAll()
#11 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Ma
ge\Index\Model\Process.php(210): Mage_Index_Model_Indexer_Abstract->reindexAll()

#12 E:\Work\Development\workspaces\current_projects\domainname\app\code\core\Ma
ge\Index\Model\Process.php(258): Mage_Index_Model_Process->reindexAll()
#13 E:\Work\Development\workspaces\current_projects\domainname\shell\indexer.ph
p(166): Mage_Index_Model_Process->reindexEverything()
#14 E:\Work\Development\workspaces\current_projects\domainname\shell\indexer.ph
p(212): Mage_Shell_Compiler->run()
#15 {main}
Catalog Search Index index was rebuilt successfully
Stock Status index was rebuilt successfully
Tag Aggregation Data index was rebuilt successfully
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 3 of 3