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

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘xxxxx_xxxxx.catalog_product_bundle_selection’ doesn’t exist
 
tempus fugit
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2008-03-09
UK
 

Error in file"/home/useip/public_html/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-0.7.4-0.7.5.php" SQLSTATE[42S02]Base table or view not found1146 Table 'useip_main.catalog_product_bundle_selection' doesn't exist
Trace:
#0 /home/useip/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(292): Mage::exception('
Mage_Core', 'Error in file: ...')
#1 /home/useip/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(179): Mage_Core_Model_Resource_Setup->_modifyResourceDb('
upgrade', '0.7.4', '0.7.5')
#2 /home/useip/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(146): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('
0.7.4', '0.7.5')
#3 /home/useip/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(121): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/useip/public_html/app/code/core/Mage/Core/Model/Config.php(214): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/useip/public_html/app/code/core/Mage/Core/Model/App.php(242): Mage_Core_Model_Config->init(Array)
#6 /home/useip/public_html/app/Mage.php(432): Mage_Core_Model_App->init('', '
store', Array)
#7 /home/useip/public_html/app/Mage.php(453): Mage::app('', '
store', Array)
#8 /home/useip/public_html/index.php(52): Mage::run()
#9 {main}

Any suggestions?

Thanks.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tempus fugit
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2008-03-09
UK
 

I could not get past this.
Could not get a 1.2.1 install wizard to complete using my original database (1.0.19870).

Have had to complete a clean install with a new database and user, then fetch my old data, files, etc. across.

NB using the following wiki article for installation via SSH, and having practiced a few times over the last few days, it is easily possible to install a new, clean, empty, latest version of magento in just 25 minutes! grin

http://www.magentocommerce.com/wiki/groups/227/installing_magento_via_shell_ssh

 
Magento Community Magento Community
Magento Community
Magento Community
 
elina
Jr. Member
 
Avatar
Total Posts:  25
Joined:  2008-04-03
Heraklion Crete
 

Hello,

i have exactly the same problem...... I am trying to upgrade from 1.0.19870 but there are alot of errors, missing db tables, 404 etc..

Can you please explain, what did you do??

 
Magento Community Magento Community
Magento Community
Magento Community
 
tempus fugit
Jr. Member
 
Avatar
Total Posts:  20
Joined:  2008-03-09
UK
 

I still haven’t completely gotten through a successful upgrade.
I did try other methods, but ultimately they were unsuccessful and I had to return to using the install wizard with my 1.0.19870 dbase.

As I mentioned above I now have clean new installs down to a fine art, so, I created a new install with a new 1.2.1 database. I created this new database on my server alongside my old one, then used phpmyadmin to ‘copy’ the missing tables from the new to the old.

The first table I copied across was the one in this thread’s headline, and copying it into the old database solved that error just fine.

However, a new error appeared immediately - see this thread:
http://www.magentocommerce.com/boards/viewthread/31254/

I manually compared the two database tables and went on to copy across all the other tables that were in 1.2.1 but not 1.0.19870, but as yet I am still stuck.

I plan to do some more hours on this today, if I can get it to complete then I’ll glady publish step-by-step instructions, but as I’m still stuck there’s not a lot of point in providing more details.

Any input to resolve the error at that link above would be very helpful ...

Has anybody successfully upgraded from 1.0.19870?
If so, any tips?
If it can’t be done in this one step upgrade, then what intermediate steps do we need to do??

Are diff file overwrites any more likely to be successful than the installer wizard?
(how would the database get updated?)

 
Magento Community Magento Community
Magento Community
Magento Community
 
medvet
Jr. Member
 
Total Posts:  2
Joined:  2009-02-11
 

Found a fix for this error:

delete catalog_product_bundle_* tables from the db

create new tables with the following structure

CREATE TABLE IF NOT EXISTS `catalog_product_bundle_option` (
  `
option_idint(10unsigned NOT NULL AUTO_INCREMENT,
  `
parent_idint(10unsigned NOT NULL,
  `
requiredtinyint(1unsigned NOT NULL DEFAULT '0',
  `
positionint(10unsigned NOT NULL DEFAULT '0',
  `
typevarchar(255NOT NULL DEFAULT '',
  
PRIMARY KEY (`option_id`),
  
KEY `FK_CATALOG_PRODUCT_BUNDLE_OPTION_PARENT` (`parent_id`)
ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Bundle Options' AUTO_INCREMENT=;

ALTER TABLE `catalog_product_bundle_option`
  
ADD CONSTRAINT `FK_CATALOG_PRODUCT_BUNDLE_OPTION_PARENTFOREIGN KEY (`parent_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE;

CREATE TABLE IF NOT EXISTS `catalog_product_bundle_option_value` (
  `
value_idint(10unsigned NOT NULL AUTO_INCREMENT,
  `
option_idint(10unsigned NOT NULL,
  `
store_idsmallint(5unsigned NOT NULL,
  `
titlevarchar(255NOT NULL DEFAULT '',
  
PRIMARY KEY (`value_id`),
  
KEY `FK_CATALOG_PRODUCT_BUNDLE_OPTION_VALUE_OPTION` (`option_id`)
ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Bundle Selections' AUTO_INCREMENT=;

ALTER TABLE `catalog_product_bundle_option_value`
  
ADD CONSTRAINT `FK_CATALOG_PRODUCT_BUNDLE_OPTION_VALUE_OPTIONFOREIGN KEY (`option_id`) REFERENCES `catalog_product_bundle_option` (`option_id`) ON DELETE CASCADE ON UPDATE CASCADE;



CREATE TABLE IF NOT EXISTS `catalog_product_bundle_selection` (
  `
selection_idint(10unsigned NOT NULL AUTO_INCREMENT,
  `
option_idint(10unsigned NOT NULL,
  `
parent_product_idint(10unsigned NOT NULL,
  `
product_idint(10unsigned NOT NULL,
  `
positionint(10unsigned NOT NULL DEFAULT '0',
  `
is_defaulttinyint(1unsigned NOT NULL DEFAULT '0',
  `
selection_price_typetinyint(1unsigned NOT NULL DEFAULT '0',
  `
selection_price_valuedecimal(12,4NOT NULL DEFAULT '0.0000',
  `
selection_qtydecimal(12,4NOT NULL DEFAULT '0.0000',
  `
selection_can_change_qtytinyint(1NOT NULL DEFAULT '0',
  
PRIMARY KEY (`selection_id`),
  
KEY `FK_CATALOG_PRODUCT_BUNDLE_SELECTION_OPTION` (`option_id`),
  
KEY `FK_CATALOG_PRODUCT_BUNDLE_SELECTION_PRODUCT` (`product_id`)
ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Bundle Selections' AUTO_INCREMENT=;

ALTER TABLE `catalog_product_bundle_selection`
  
ADD CONSTRAINT `FK_CATALOG_PRODUCT_BUNDLE_SELECTION_OPTIONFOREIGN KEY (`option_id`) REFERENCES `catalog_product_bundle_option` (`option_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  
ADD CONSTRAINT `FK_CATALOG_PRODUCT_BUNDLE_SELECTION_PRODUCTFOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE;

upgrade as usual.

You will of course lose your bundled products, but you may be able to change the tables instead of dropping them to preserve the bundled product info. In my case, I didn’t have any bundled products so it was not an issue.

 
Magento Community Magento Community
Magento Community
Magento Community
 
renzito
Jr. Member
 
Total Posts:  5
Joined:  2008-11-03
 

It really helps to rebuild all indexes after upgrading..

Especially the flat catalogue indexes. smile

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