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

[SOLVED] 1.4 Report Event ID issue
 
iboxsecuritydotnet
Jr. Member
 
Total Posts:  18
Joined:  2009-01-03
 

Running into problems and finally down to the last one now, but where is the error coming from?

a:5:{i:0;s:313:"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`MYSITE_MYSITEewels/mage_report_event`, CONSTRAINT `FK_REPORT_EVENT_TYPE` FOREIGN KEY (`event_type_id`) REFERENCES `mage_report_event_types` (`event_type_id`) ON DELETE CASCADE ON UPDATE C)";i:1;s:2340:"#0 /home/MYSITE/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/MYSITE/public_html/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
#2 /home/MYSITE/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ma...', Array)
#3 /home/MYSITE/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ma...', Array)
#4 /home/MYSITE/public_html/lib/Zend/Db/Adapter/Abstract.php(546): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ma...', Array)
#5 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(390): Zend_Db_Adapter_Abstract->insert('mage_report_eve...', Array)
#6 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/Abstract.php(284): Mage_Core_Model_Mysql4_Abstract->save(Object(Mage_Reports_Model_Event))
#7 /home/MYSITE/public_html/app/code/core/Mage/Reports/Model/Event/Observer.php(69): Mage_Core_Model_Abstract->save()
#8 /home/MYSITE/public_html/app/code/core/Mage/Reports/Model/Event/Observer.php(133): Mage_Reports_Model_Event_Observer->_event(1, '113')
#9 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/App.php(1207): Mage_Reports_Model_Event_Observer->catalogProductView(Object(Varien_Event_Observer))
#10 /home/MYSITE/public_html/app/Mage.php(416): Mage_Core_Model_App->dispatchEvent('catalog_control...', Array)
#11 /home/MYSITE/public_html/app/code/core/Mage/Catalog/controllers/ProductController.php(139): Mage::dispatchEvent('catalog_control...', Array)
#12 /home/MYSITE/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_ProductController->viewAction()
#13 /home/MYSITE/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#14 /home/MYSITE/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /home/MYSITE/public_html/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#16 /home/MYSITE/public_html/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#17 /home/MYSITE/public_html/index.php(78): Mage::run('', 'store')
#18 {main}"
;s:3:"url";s:21:"/necklaces/aster.html";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"english";}
 
Magento Community Magento Community
Magento Community
Magento Community
 
iboxsecuritydotnet
Jr. Member
 
Total Posts:  18
Joined:  2009-01-03
 

Solved ---- somehow the event types table had been flushed and was causing this problem.

 
Magento Community Magento Community
Magento Community
Magento Community
 
DarKZeroS
Jr. Member
 
Total Posts:  8
Joined:  2008-11-13
 

i have this problem friend how i can fix this
thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
matthewww
Jr. Member
 
Total Posts:  3
Joined:  2011-01-21
 

What did you do to solve this?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Justin Atack
Member
 
Avatar
Total Posts:  42
Joined:  2009-01-03
Sydney, Australia
 

Looks like it could be similar to the problem I\’m having. Could you please let us know how you fixed this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
matthewww
Jr. Member
 
Total Posts:  3
Joined:  2011-01-21
 

Solution is to import the magentoreport_event_types data again from clean install

LOCK TABLES `magentoreport_event_types` WRITE;
/*!40000 ALTER TABLE `magentoreport_event_types` DISABLE KEYS */;
INSERT INTO `magentoreport_event_types` VALUES (1,’catalog_product_view’,1),(2,’sendfriend_product’,1),(3,’catalog_product_compare_add_product’,1),(4,’checkout_cart_add_product’,1),(5,’wishlist_add_product’,1),(6,’wishlist_share’,1);
/*!40000 ALTER TABLE `magentoreport_event_types` ENABLE KEYS */;
UNLOCK TABLES;

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