Magento没有将产品保存在数据库中

时间:2014-04-16 01:14:19

标签: database magento magento-1.7

我的Magento 1.7.0.2不会将产品保存在数据库中。输入数据并确认结束后出现白色错误但产品未出现在目录和数据库中。在system.log中我有这个:

2014-04-16T00:51:31+00:00 ERR (3): User Error: Some transactions have not been committed or rolled back  in /data/web/virtuals/45559/virtual/www/subdom/shop/lib/Varien/Db/Adapter/Pdo/Mysql.php on line 3645

并在exception.log中我有:

2014-04-16T00:50:30+00:00 DEBUG (7): Exception message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'website_date' in 'field list'
Trace: #0 /data/web/virtuals/45559/virtual/www/subdom/shop/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /data/web/virtuals/45559/virtual/www/subdom/shop/lib/Zend/Db/Statement.php(300): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /data/web/virtuals/45559/virtual/www/subdom/shop/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#3 /data/web/virtuals/45559/virtual/www/subdom/shop/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ca...', Array)
#4 /data/web/virtuals/45559/virtual/www/subdom/shop/lib/Varien/Db/Adapter/Pdo/Mysql.php(419): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ca...', Array)
#5 /data/web/virtuals/45559/virtual/www/subdom/shop/lib/Varien/Db/Adapter/Pdo/Mysql.php(1974): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ca...', Array)
#6 /data/web/virtuals/45559/virtual/www/subdom/shop/lib/Varien/Db/Adapter/Pdo/Mysql.php(1947): Varien_Db_Adapter_Pdo_Mysql->insertArray('catalog_product...', Array, Array)
#7 /data/web/virtuals/45559/virtual/www/subdom/shop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(599): Varien_Db_Adapter_Pdo_Mysql->insertMultiple('catalog_product...', Array)
#8 /data/web/virtuals/45559/virtual/www/subdom/shop/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php(378): Mage_Catalog_Model_Resource_Product_Indexer_Price->_prepareWebsiteDateTable()
#9 /data/web/virtuals/45559/virtual/www/subdom/shop/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Product_Indexer_Price->reindexAll()
#10 /data/web/virtuals/45559/virtual/www/subdom/shop/app/code/core/Mage/Index/Model/Process.php(209): Mage_Index_Model_Indexer_Abstract->reindexAll()
#11 /data/web/virtuals/45559/virtual/www/subdom/shop/app/code/core/Mage/Index/Model/Process.php(255): Mage_Index_Model_Process->reindexAll()
#12 /data/web/virtuals/45559/virtual/www/subdom/shop/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php(178): Mage_Index_Model_Process->reindexEverything()
#13 /data/web/virtuals/45559/virtual/www/subdom/shop/app/code/core/Mage/Core/Controller/Varien/Action.php(419): Mage_Index_Adminhtml_ProcessController->massReindexAction()
#14 /data/web/virtuals/45559/virtual/www/subdom/shop/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('massReindex')
#15 /data/web/virtuals/45559/virtual/www/subdom/shop/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#16 /data/web/virtuals/45559/virtual/www/subdom/shop/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#17 /data/web/virtuals/45559/virtual/www/subdom/shop/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#18 /data/web/virtuals/45559/virtual/www/subdom/shop/index.php(87): Mage::run('', 'store')
#19 {main}

有人可以告诉我吗?

由于

1 个答案:

答案 0 :(得分:0)

Alda,website_date列中缺少catalog_product_index_website列。检查该表。

表sql是

CREATE TABLE IF NOT EXISTS `catalog_product_index_website` (
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `website_date` date DEFAULT NULL COMMENT 'Website Date',
  `rate` float DEFAULT '1' COMMENT 'Rate',
  PRIMARY KEY (`website_id`),
  KEY `IDX_CATALOG_PRODUCT_INDEX_WEBSITE_WEBSITE_DATE` (`website_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Catalog Product Website Index Table';