Magento Forum

   
Installing the Sample Product Data for Magento 0.7.15480 Release
 
hobz
Jr. Member
 
Total Posts:  2
Joined:  2008-01-29
 

This is the error message that I received when logging onto the homepage after I installed the sample products for the 0.7.15480 release.  any ideas on how I can fix this. it was installed into a clean database.

exception ‘Zend_Db_Statement_Exception’ with message ‘SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘magento.wishlist’ doesn’t exist’ in /Library/WebServer/htdocs/magento/lib/Zend/Db/Statement/Pdo.php:227
Stack trace:
#0 /Library/WebServer/htdocs/magento/lib/Zend/Db/Statement.php(279): Zend_Db_Statement_Pdo->_execute(Array)
#1 /Library/WebServer/htdocs/magento/lib/Zend/Db/Adapter/Abstract.php(396): Zend_Db_Statement->execute(Array)
#2 /Library/WebServer/htdocs/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(206): Zend_Db_Adapter_Abstract->query(Object(Zend_Db_Select), Array)
#3 /Library/WebServer/htdocs/magento/lib/Zend/Db/Adapter/Abstract.php(693): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select), Array)
#4 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(296): Zend_Db_Adapter_Abstract->fetchRow(Object(Zend_Db_Select))
#5 /Library/WebServer/htdocs/magento/app/code/core/Mage/Wishlist/Model/Wishlist.php(52): Mage_Core_Model_Mysql4_Abstract->load(Object(Mage_Wishlist_Model_Wishlist), NULL, ‘customer_id’)
#6 /Library/WebServer/htdocs/magento/app/code/core/Mage/Wishlist/Block/Customer/Sidebar.php(41): Mage_Wishlist_Model_Wishlist->loadByCustomer(Object(Mage_Customer_Model_Customer))
#7 /Library/WebServer/htdocs/magento/app/code/core/Mage/Wishlist/Block/Customer/Sidebar.php(34): Mage_Wishlist_Block_Customer_Sidebar->getWishlist()
#8 /Library/WebServer/htdocs/magento/app/code/core/Mage/Wishlist/Block/Customer/Sidebar.php(61): Mage_Wishlist_Block_Customer_Sidebar->getWishlistItems()
#9 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Block/Text/List.php(36): Mage_Wishlist_Block_Customer_Sidebar->toHtml()
#10 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Block/Abstract.php(426): Mage_Core_Block_Text_List->toHtml()
#11 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Block/Abstract.php(404): Mage_Core_Block_Abstract->_getChildHtml(’right’, true)
#12 /Library/WebServer/htdocs/magento/app/design/frontend/default/default/template/page/2columns-right.phtml(62): Mage_Core_Block_Abstract->getChildHtml(’right’)
#13 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Block/Template.php(122): include(’/Library/WebSer...’)
#14 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Block/Template.php(153): Mage_Core_Block_Template->fetchView(’frontend/defaul...’)
#15 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Block/Template.php(198): Mage_Core_Block_Template->renderView()
#16 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Model/Layout.php(417): Mage_Core_Block_Template->toHtml()
#17 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(313): Mage_Core_Model_Layout->getOutput()
#18 /Library/WebServer/htdocs/magento/app/code/core/Mage/Cms/Helper/Page.php(84): Mage_Core_Controller_Varien_Action->renderLayout()
#19 /Library/WebServer/htdocs/magento/app/code/core/Mage/Cms/controllers/IndexController.php(26): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), ‘home’)
#20 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(336): Mage_Cms_IndexController->indexAction()
#21 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(150): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#22 /Library/WebServer/htdocs/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(147): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#23 /Library/WebServer/htdocs/magento/app/Mage.php(379): Mage_Core_Controller_Varien_Front->dispatch()
#24 /Library/WebServer/htdocs/magento/index.php(29): Mage::run(’base’)
#25 {main}

 
Magento Community Magento Community
Magento Community
Magento Community
 
phrench
Member
 
Total Posts:  65
Joined:  2007-11-10
 

i try to run the sql statement from phpmyadmin and get following error:

Error

SQL command
:

--
-- 
Dumping data for table `admin_assert`
--
/*!40000 ALTER TABLE `admin_assert` DISABLE KEYS */;

/*!40000 ALTER TABLE `admin_assert` ENABLE KEYS */;

--
-- 
Table structure for table `admin_role`
--
DROP TABLE IF EXISTS `admin_role` ;

MySQL reportsDocumentation
#1217 - Cannot delete or update a parent row: a foreign key constraint fails

Any idea? Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Spek
Sr. Member
 
Total Posts:  77
Joined:  2007-11-28
 

I’ve got mine working by importing the sample data into an empty database I had called “magento”. The SQL import didn’t succeed without errors, but there were 174 tables in the database after a few tries and I decided that was enough for now smile
I followed that up with an install from a tar file with the “beta” option chosen for package download.

so:
- drop & create new database (dropping the tables inside an existing database instead is cumbersome because of relations throwing errors upon delete)
- import sample data
- install newest magento version

Have fun.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

@phrench:

Before running every batch of SQL commands, run this:

SET SQL_MODE='';
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKSFOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODESQL_MODE='NO_AUTO_VALUE_ON_ZERO';

After each one run this:

SET SQL_MODE=IFNULL(@OLD_SQL_MODE,'');
SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS,0);

 
Magento Community Magento Community
Magento Community
Magento Community
 
tunersedge
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-01-29
 

Hello...just getting into this platform. Seems nice so far.

I’m trying to load the sample data. I dropped all my tables, reinstalled. I had already loaded the necessary files into the /media folder. When I get into the admin backend, there are no products. I think the question is this: Do I load the sample data SQL script BEFORE or AFTER I reinstall. Should there be zero tables in my DB when I run the script? Or do I let the install happen, then load the sample script.

Thanks for the clarification!

Aaron
Tuner’s Edge

 
Magento Community Magento Community
Magento Community
Magento Community
 
Moshe
Magento Team
 
Avatar
Total Posts:  1770
Joined:  2007-08-07
Los Angeles
 

@tunersedge: when did you run the sample data script?

if it was after you have installed, go to System > Cache Management , check “Refresh all cache” and click Save.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tunersedge
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2008-01-29
 

That worked perfectly. Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
MindWerks
Jr. Member
 
Total Posts:  9
Joined:  2008-01-29
 

I’m having trouble importing the sample data into MySql via Phpadmin. When attemping I receive the following error:

No data was received to importEither no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configurationSee FAQ 1.16.

What did I miss? Thanks!

Running Ubuntu 7.10 (32bit), MySQL 5.0.45, PHP 5.2.3

 
Magento Community Magento Community
Magento Community
Magento Community
 
joolsr
Sr. Member
 
Total Posts:  99
Joined:  2008-01-16
 

you can change the limit in your php.ini file. Sorry not to be more help, but I’m a bit of a newbie at this myself

 
Magento Community Magento Community
Magento Community
Magento Community
 
phrench
Member
 
Total Posts:  65
Joined:  2007-11-10
 
Moshe - 29 January 2008 04:38 PM

@phrench:

Before running every batch of SQL commands, run this:

SET SQL_MODE='';
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKSFOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODESQL_MODE='NO_AUTO_VALUE_ON_ZERO';

Thanks for the help, but I still get the same error :-(
Any other idea?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MindWerks
Jr. Member
 
Total Posts:  9
Joined:  2008-01-29
 

I ended up doing a command line import with the data using

mysql -u USER -p DBNAME dump.sql

 
Magento Community Magento Community
Magento Community
Magento Community
 
DOA
Jr. Member
 
Total Posts:  12
Joined:  2008-01-23
 
MindWerks - 31 January 2008 03:44 PM

I ended up doing a command line import with the data using

mysql -u USER -p DBNAME dump.sql

Thank you MindWerks… that method worked a treat…

tried latest phpmyadmin - loads of errors importing…
tried MySQL Query browser - errors
tried bigdump php script - same error.......

To use MindWerk’s method, I...
1) deleted all tables from my shop database,
2) copied a clean version of magento to my webroot folder,
3) installed magento,
4) ran the MySql -u root -p shop < sample_data.sql from a command prompt
5) went into magento admin (remember that the install overwrites admin user id with uid=’admin’ pw=’123123’) and selected ‘System-->Cache Management’
6) Selected the ‘Refresh All Cache’ checkbox and then ‘Save cache settings’
7) back to frontend - all data now shown

thanks once again smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
thomas_clight
Jr. Member
 
Total Posts:  11
Joined:  2008-05-01
Paris
 
phrench - 31 January 2008 01:03 PM

Moshe - 29 January 2008 04:38 PM
@phrench:

Before running every batch of SQL commands, run this:
SET SQL_MODE='';
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKSFOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODESQL_MODE='NO_AUTO_VALUE_ON_ZERO';

Thanks for the help, but I still get the same error :-(
Any other idea?

Hi! I get the same error on a clean new database (not even sample data). I too tried Moshe’s fixe to no avail. I understand the problem :
catalog_category_entity_int references a store ‘0’ which doesn’t exist in core_store. I guess the solution is to hand-build a new database without these integrity problems.

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