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

After update 1.4 no products showing
 
webcitz
Sr. Member
 
Avatar
Total Posts:  128
Joined:  2008-11-10
Appleton, WI
 
liesegang - 21 February 2010 10:25 AM

the exception.log showed the following error

2010-02-20T18:16:47+00:00 DEBUG (7): Exception messageSQLSTATE[23000]Integrity constraint violation1062 Duplicate entry '295-0-1-696' for key 'PRIMARY'
Trace#0 /eshop/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /eshop/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
#2 /eshop/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#3 /eshop/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)

This was just a little help because one could only guess which table was meant. So I walked through the indices and noticed that only table catalog_product_index_price contains a primary index over 4 columns which could be meant by ‘295-0-1-696’. The first field 295 referes to catalog_product_entity.entity_id. I then deleted the row with entity_id = 295 and the error did not occur again. The new price index could be created and the products showed up again in the frontend.

Hope this helps.

liesegang - Thanks a ton for the advice on where to look, this fixed my problem with product prices not reindexing after the upgrade from 1.3.2.4 to 1.4.0.1.

 
Magento Community Magento Community
Magento Community
Magento Community
 
VicHunter
Jr. Member
 
Avatar
Total Posts:  18
Joined:  2009-02-07
 

MAtt*! it works, thank you very much

 
Magento Community Magento Community
Magento Community
Magento Community
 
mrki
Jr. Member
 
Total Posts:  21
Joined:  2010-01-20
 

Product images doesn’t show on front page of our store, this is was worked out for me:

Ftp to your store and navigate to:
/public_html/var/cache
and remove everything inside the cache directory
Login to admin of your store and rebuild your cache and index:
System->Cache Management
System->Index Management

 
Magento Community Magento Community
Magento Community
Magento Community
 
reshel
Member
 
Avatar
Total Posts:  38
Joined:  2010-03-24
East Texas
 

My products are showing but I have an error in the product price index when re-indexing ran the exception log and tried the method of finding a duplicate.. here is the log

2010-05-28T08:35:26+00:00 DEBUG (7): Exception messageSQLSTATE[23000]Integrity constraint violation1062 Duplicate entry '26-0-1-1280' for key 'PRIMARY'
Trace#0 /home4/yahuishc/public_html/thimble/shop/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home4/yahuishc/public_html/thimble/shop/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
#2 /home4/yahuishc/public_html/thimble/shop/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `mg...', Array)
#3 /home4/yahuishc/public_html/thimble/shop/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `mg...', Array)
#4 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php(493): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `mg...')
#5 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php(119): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Default->_applyCustomOption()
#6 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php(358): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price_Default->reindexAll()
#7 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Index/Model/Indexer/Abstract.php(125): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price->reindexAll()
#8 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Index/Model/Process.php(139): Mage_Index_Model_Indexer_Abstract->reindexAll()
#9 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#10 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(178): Mage_Index_Model_Process->reindexEverything()
#11 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->massReindexAction()
#12 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('massReindex')
#13 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Core/Controller/Varien/Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#14 /home4/yahuishc/public_html/thimble/shop/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#15 /home4/yahuishc/public_html/thimble/shop/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#16 /home4/yahuishc/public_html/thimble/shop/index.php(78): Mage::run('', 'store')
#17 {main}

using the method and deleting the one that is duplicate , im not sure will work.. there is no id 26 when i look in the data base on the table mentioned above.. can anyone help decipher what to do on this..

my product price index is constantly showing -processing- when trying to index..error says there is some problem with indexing.
this happened after I edited some sttributes to not show in the search becasue i was having a problem with the search not working.. after deleting some attibutes like color, etc.. that i will not be using and editing a couple of attibutes to not show in the search listing.. price was one of them i set to no and now the search is working properly but im getting this error on the indexing.

please help any suggestions as to what table i look for to repair or what steps of how to do it.. I am going public before the first of the week.. products and front end is show good.. im not sure why its having index problems..

any help???

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
moomoo
Sr. Member
 
Avatar
Total Posts:  192
Joined:  2009-07-10
 
dvnitycker - 12 March 2010 01:13 AM

Problem was my sql tables were MyISAM engine, and they need to be InnoDB in order for ugrade to work.
...
So then, I had to convert my tables to InnoDB. Use the convert.php for that.

I have the same issue and the same idea for why it’s failing, nice work posting the scripts.

But, I think some of the tables need to be myISAM. I read somewhere that the logs for instance can slow down the site if they are innoDB.

From a fresh 1.3.2.4 install it seems these tables were set as myISAM:

adminnotification_inbox
admin_assert
catalogsearch_fulltext
log_customer
log_quote
log_summary
log_summary_type
log_url
log_url_info
log_visitor
log_visitor_info
sendfriend_log

Ok thanks a lot for those scripts, they worked! I was able to run the installer on a fresh 1.4.0.1 and a 1.3.2 database. I had mucked with the myISAM/innoDB at some point trying to speed it up.

I’ll attach my edit of the convert script, to leave out the tables which seems like they should be myISAM, it uses the method suggested in dvnitycker’s post. I also added in code to set the collation (I had some weird stuff going on) and the recreate script. Just access the script with ?action=collate or ?action=recreate to do those bits.

The collate action will only change the table collation, not the fields. To do that you might want to export the db, search-replace, then upload.

File Attachments
convert.php  (File Size: 92KB - Downloads: 107)
 
Magento Community Magento Community
Magento Community
Magento Community
 
moomoo
Sr. Member
 
Avatar
Total Posts:  192
Joined:  2009-07-10
 

Okay I found a script to auto do the collations in each table, I’ve added it to the previous convert.php. I stuck in a bunch of links as well to make it easier to run.

** Back up your database first! **

The field_collation links produce a bunch of sql errors, but at the end, the indexes all completed!

[edit] i’ve commented out the field collations as this mucked up some attributes (showed the admin value instead of website value) and shipping table rates… best way to do that seems to be to export db, search/replace with text editor, then upload…

File Attachments
convert.php  (File Size: 100KB - Downloads: 211)
 
Magento Community Magento Community
Magento Community
Magento Community
 
DirectLowVoltage
Jr. Member
 
Total Posts:  30
Joined:  2009-02-19
 

For anyone that is still having the issues with no products showing up AND not being able to Re-index product prices…

try to re-index only the prices.. after you get the error check your exception.log file and see what it says… (located in var/log/)

I had a similar error posted earlier with the Cannot add or update a child row: a foreign key constraint fails (`magento`.`catalog_product_index_tier_price`, CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_ENTITY crap....

went into the catalog_product_entity_tier_price table and just cleared it out…

went back to admin and was able to re-index products.. and all the products then showed up..

granted I probably lost some tier pricing but WELL worth it… for me anyways…

 
Magento Community Magento Community
Magento Community
Magento Community
 
BIM
Jr. Member
 
Total Posts:  7
Joined:  2010-03-21
 

Hi,
I have same problem with price index. Status is always PROCESSING. I does many tricks which I found in forums, but nothing helps. In exception.log I found this after try to reindex price:

2010-10-06T13:17:25+00:00 DEBUG (7): Exception messageSQLSTATE[23000]Integrity constraint violation1452 Cannot add or update a child rowa foreign key constraint fails (`myshop`.`catalog_product_index_tier_price`, CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_ENTITYFOREIGN KEY (`entity_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCAD)
Trace#0 /home/myshop/public_html/STARTER/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/myshop/public_html/STARTER/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
#2 /home/myshop/public_html/STARTER/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#3 /home/myshop/public_html/STARTER/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#4 /home/myshop/public_html/STARTER/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php(429): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...')
#5 /home/myshop/public_html/STARTER/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php(370): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price->_prepareTierPriceIndex()
#6 /home/myshop/public_html/STARTER/app/code/core/Mage/Index/Model/Indexer/Abstract.php(125): Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Indexer_Price->reindexAll()
#7 /home/myshop/public_html/STARTER/app/code/core/Mage/Index/Model/Process.php(139): Mage_Index_Model_Indexer_Abstract->reindexAll()
#8 /home/myshop/public_html/STARTER/app/code/core/Mage/Index/Model/Process.php(167): Mage_Index_Model_Process->reindexAll()
#9 /home/myshop/public_html/STARTER/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(124): Mage_Index_Model_Process->reindexEverything()
#10 /home/myshop/public_html/STARTER/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Index_Adminhtml_ProcessController->reindexProcessAction()
#11 /home/myshop/public_html/STARTER/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('reindexProcess')
#12 /home/myshop/public_html/STARTER/app/code/core/Mage/Core/Controller/Varien/Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /home/myshop/public_html/STARTER/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#14 /home/myshop/public_html/STARTER/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#15 /home/myshop/public_html/STARTER/index.php(80): Mage::run('', 'store')
#16 {main}

I think this is some MySQL problem, but what is wrong?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oberst Hajj
Member
 
Total Posts:  38
Joined:  2010-10-16
 

I just did a fresh install for the very first time and I can not get my products to show up in either Guest mode or logged in.  I turned on logging after reading this thread and this is what I got:

2010-10-22T06:19:48+00:00 ERR (3): 
exception 'Exception' with message 'File was not uploaded.' in /home/wingsofw/public_html/www.aerodromeaccessories.com/lib/Varien/File/Uploader.php:139
Stack trace
:
#0 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php(57): Varien_File_Uploader->__construct('image')
#1 [internal function]: Mage_Catalog_Model_Category_Attribute_Backend_Image->afterSave(Object(Mage_Catalog_Model_Category))
#2 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Eav/Model/Entity/Abstract.php(609): call_user_func_array(Array, Array)
#3 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Eav/Model/Entity/Abstract.php(1445): Mage_Eav_Model_Entity_Abstract->walkAttributes('backend/afterSa...', Array)
#4 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category.php(233): Mage_Eav_Model_Entity_Abstract->_afterSave(Object(Mage_Catalog_Model_Category))
#5 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Eav/Model/Entity/Abstract.php(956): Mage_Catalog_Model_Resource_Eav_Mysql4_Category->_afterSave(Object(Mage_Catalog_Model_Category))
#6 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Core/Model/Abstract.php(306): Mage_Eav_Model_Entity_Abstract->save(Object(Mage_Catalog_Model_Category))
#7 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php(317): Mage_Core_Model_Abstract->save()
#8 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Catalog_CategoryController->saveAction()
#9 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('save')
#10 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Core/Controller/Varien/Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#12 /home/wingsofw/public_html/www.aerodromeaccessories.com/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#13 /home/wingsofw/public_html/www.aerodromeaccessories.com/index.php(80): Mage::run('', 'store')
#14 {main}

How do I find out what file was not uploaded during my install?

Thanks for any help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mamaduckie
Jr. Member
 
Total Posts:  7
Joined:  2009-01-12
 
MAtt*! - 21 February 2010 01:01 AM

I have the solution for you guys after a few hours, in your 1.4 database, go to the customer_groups table, and reset the NOT LOGGED IN customer_group_id to 0.

My products then appeared on the site without logging in.

Cheers
Matt from Chevron Technologies.

www.chevrontechnologies.net.au
grin

Thanks, Matt.  Worked like a charm for me!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
zemang
Jr. Member
 
Total Posts:  5
Joined:  2010-12-21
 

what really happened is i removed the qaaaa group in the manage customer group.before editing the database table, name a new group in the customer manager then go to the database in the customer_group table, renaming it to NOT LOGGED IN and setting the value to 0.it worked just fine.

Just to remind everyone, never delete the qaaaa customer group seems that will cause the bug.

Hope this will help.
zemang

 
Magento Community Magento Community
Magento Community
Magento Community
 
Mage Guru
Sr. Member
 
Avatar
Total Posts:  79
Joined:  2009-07-07
 
shaunp - 04 March 2010 01:13 PM

Forgive me if this has been posted somewhere else, trust me I’ve been looking for an answer to this for days.

Like so many others here, I’ve upgraded to 1.4 and my products are no longer showing up on the client side. I decided to look at my products on the admin side and I noticed that under the “Product Information” section I’m missing some options. The General, Prices, Meta Information, Descriptions, Images and Design are all missing. I do have Inventory, Categories, Related Products, Up-Sells, Cross-Sells, Product Alerts, Product Reviews, Product Tags, Customers Tagged Product and Custom Options.

I’m pretty sure these two errors are related. What do I need to do to get back my Product Information options?

Hi,

I’m having the exact same problem after upgrading. Did you have any luck sorting this out?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
viastudio
Jr. Member
 
Total Posts:  2
Joined:  2011-03-16
 

This is an update of the script originally posted by @Netismine.

I was upgrading from Magento 1.1.6 to 1.5.0.1 and ran into similar problems - Foreign Key Constraint issues, no products displaying, could not re-index tables.

If you are converting or upgrading an existing Magento database check out the original post with this convert script as it a little more elegant and can be used for any Magento version. See script comments.

File Attachments
magento_table_convert.php  (File Size: 3KB - Downloads: 110)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Theodore Doan
Jr. Member
 
Total Posts:  26
Joined:  2010-01-03
Hanoi, Vietnam
 

Hello all,

To fix the “products do not display on the frontend” you have to run SQL script manually through PhpMyAdmin or any database management tools. Bellow is the scripts:

1. Get all entity_id of items which you have to delete

SELECT DISTINCT `tp`.`entity_id`
FROM `catalog_product_entity_tier_price` AS `tp`
INNER JOIN `customer_group` AS `cg` ON tp.all_groups = 1 OR (tp.all_groups = 0 AND tp.customer_group_id = cg.customer_group_id)
INNER JOIN `core_website` AS `cw` ON tp.website_id = 0 OR tp.website_id = cw.website_id
INNER JOIN `catalog_product_index_website` AS `cwd` ON cw.website_id = cwd.website_id
WHERE (cw.website_id != 0)

AND tp.entity_id NOT IN (SELECT `entity_id` FROM `catalog_product_entity`)

GROUP BY `tp`.`entity_id`, `cg`.`customer_group_id`, `cw`.`website_id` ORDER BY `tp`.`entity_id` ASC

2. Delete all items

DELETE FROM `catalog_product_entity_tier_price` WHERE `entity_id` IN ({GET_FROM_ABOVE_SELECT_QUERY})

Then run re-index process again,

PS: Maybe you have to delete all files at var/locks folder

 
Magento Community Magento Community
Magento Community
Magento Community
 
sonician
Member
 
Total Posts:  49
Joined:  2008-11-29
 
Theodore Doan - 31 March 2011 02:02 AM

Hello all,

To fix the “products do not display on the frontend” you have to run SQL script manually through PhpMyAdmin or any database management tools. Bellow is the scripts:

1. Get all entity_id of items which you have to delete

SELECT DISTINCT `tp`.`entity_id`
FROM `catalog_product_entity_tier_price` AS `tp`
INNER JOIN `customer_group` AS `cg` ON tp.all_groups = 1 OR (tp.all_groups = 0 AND tp.customer_group_id = cg.customer_group_id)
INNER JOIN `core_website` AS `cw` ON tp.website_id = 0 OR tp.website_id = cw.website_id
INNER JOIN `catalog_product_index_website` AS `cwd` ON cw.website_id = cwd.website_id
WHERE (cw.website_id != 0)

AND tp.entity_id NOT IN (SELECT `entity_id` FROM `catalog_product_entity`)

GROUP BY `tp`.`entity_id`, `cg`.`customer_group_id`, `cw`.`website_id` ORDER BY `tp`.`entity_id` ASC

2. Delete all items

DELETE FROM `catalog_product_entity_tier_price` WHERE `entity_id` IN ({GET_FROM_ABOVE_SELECT_QUERY})

Then run re-index process again,

PS: Maybe you have to delete all files at var/locks folder

Do you know if this solution works for Magento 1.5.0.1?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top