View Issue Details

IDProjectCategoryView StatusLast Update
0006265OXID eShop (all versions)4.01. Database handlingpublic2015-12-07 14:12
Reporterrobert blank Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.9.6 / 5.2.6 
Fixed in Version4.9.7 / 5.2.7 
Summary0006265: Adding additional multi language tables breaks updateViews, after a certain number of languages is installed
DescriptionoxRegistry::getConfig()->getConfigParam("iLangPerTable") defines the number of languages, which are stored in each "multilang table".

When a new language is added to a shop, a whole bunch of new tables is created, if the number of languages is greater than iLangPerTable (e.g. oxarticles_set1)

When an additional multilanguage table xy is added after these tables are created, the shop assumes that the xy_set1 also exists and throws an Exception, when updateViews is called
Steps To Reproduce1. Install OXID eShop EE 5.2.6
2. Add a total of 9 languages
3. Create a multilanguage table with the attached sql script.
4. Add the name of this table to the array $this->aMultiLangTables in config.inc.php
5. Run updateViews
6. See the EXCEPTION.log
Additional Informationapplication/models/oxshop.php:616
will throw an Exception, if table does not exist.
TagsNo tags attached.
Attached Files
EXCEPTION_LOG.txt (2,336 bytes)   
oxConnectionException-oxException (time: 2015-11-17 18:44:29): [1146]: mysql error: [1146: Table 'ee_526.foo_set1' doesn't exist] in EXECUTE (SHOW COLUMNS FROM foo_set1, ) with user root
 
 Stack Trace: #0 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/core/adodblite/adodbSQL_drivers/mysql/mysql_driver.inc(369): adodb_throw('mysql', 'EXECUTE', 1146, 'Table 'paypalpl...', 'SHOW COLUMNS FR...', false, Object(object_ADOConnection))
#1 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/core/adodblite/adodb.inc.php(316): mysql_driver_ADOConnection->do_query('SHOW COLUMNS FR...', -1, -1, false)
#2 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/core/adodblite/adodbSQL_drivers/mysql/mysql_meta_module.inc(229): ADOConnection->Execute('SHOW COLUMNS FR...')
#3 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/core/oxlegacydb.php(347): mysql_meta_ADOConnection->MetaColumns('foo_set1')
#4 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/core/oxdbmetadatahandler.php(57): oxLegacyDb->metaColumns('foo_set1')
#5 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/application/models/oxshop.php(616): oxDbMetaDataHandler->getFields('foo_set1')
#6 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/application/models/oxshop.php(888): oxShop->_getViewSelectMultilang('foo')
#7 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/application/models/oxshop.php(859): oxShop->createViewQuery('foo')
#8 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/application/models/oxshop.php(571): oxShop->_prepareViewsQueries()
#9 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/core/oxdbmetadatahandler.php(524): oxShop->generateViews(false, Array)
#10 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/application/controllers/admin/tools_list.php(38): oxDbMetaDataHandler->updateViews()
#11 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/core/oxview.php(539): Tools_List->updateViews()
#12 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/core/oxshopcontrol.php(358): oxView->executeFunction('updateViews')
#13 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/core/oxshopcontrol.php(131): oxShopControl->_process('tools_list', 'updateViews', NULL, NULL)
#14 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/core/oxid.php(32): oxShopControl->start()
#15 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/index.php(18): Oxid::run()
#16 /var/www/OXID_ESHOP_EE_5.2.6_SNAPSHOT/admin/index.php(19): require_once('/var/www/OXID_E...')
#17 {main}

 Connection Adress --> 
Connection Error --> 
---------------------------------------------
EXCEPTION_LOG.txt (2,336 bytes)   
create_table_foo.txt (624 bytes)   
CREATE TABLE IF NOT EXISTS `foo` (
  `OXID` char(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL COMMENT 'Item id',
  `FOOTITLE` varchar(128) NOT NULL DEFAULT '' COMMENT 'Title (multilanguage)',
  `FOOTITLE_1` varchar(128) NOT NULL DEFAULT '',
  `FOOTITLE_2` varchar(128) NOT NULL DEFAULT '',
  `FOOTITLE_3` varchar(128) NOT NULL DEFAULT '',
  `FOOTITLE_4` varchar(128) NOT NULL DEFAULT '',
  `FOOTITLE_5` varchar(128) NOT NULL DEFAULT '',
  `FOOTITLE_6` varchar(128) NOT NULL DEFAULT '',
  `FOOTITLE_7` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`OXID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='foo';
create_table_foo.txt (624 bytes)   
ThemeNot defined
BrowserNot defined
PHP VersionNot defined
Database VersionNot defined

Activities

robert blank

2015-11-17 18:51

reporter   ~0011308

Obviously the fact that an exception is thrown is not the issue, but that from this moment on updateViews is inusable.