开发者

SQLSTATE[42S02]: Base table or view not found:

开发者 https://www.devze.com 2023-01-06 21:36 出处:网络
i was moving website from my developing server to public webserver by doing fresh checkout and exporting/importing the database. Afterwards, everything works except when there is an access to catalog_

i was moving website from my developing server to public webserver by doing fresh checkout and exporting/importing the database. Afterwards, everything works except when there is an access to catalog_category models the website breaks and in the report there are the following error:

   a:5:{i:0;s:113:"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'openbox.catalog_category_entity_varchar' doesn't exist";i:1;s:2369:"#0 /lib/Zend/Db/Statement.php(305): Zend_Db_Statement_Pdo->_execute(Array)
   #1 /lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
   #2 /lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT `attr_ta...', Array)
   #3 /lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `attr_ta...', Array)
   #4 /lib/Zend/Db/Adapter/Abstract.php(706): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
   #5 /app/code/local/Mage/Eav/Model/Entity/Abstract.php(851): Zend_Db_Adapter_Abstract->fetchAll(Object(Varien_Db_Select))
   #6 /app/code/local/Mage/Catalog/Model/Resource/Eav/Mysql4/Abstract.php(587): Mage_Eav_Model_Entity_Abstract->load(Object(Mage_Catalog_Model_Category), 5, NULL)
   #7 /app/code/local/Mage/Core/Model/Abstract.php(223): Mage_Catalog_Model_Resource_Ea开发者_如何学Gov_Mysql4_Abstract->load(Object(Mage_Catalog_Model_Category), 5, NULL)
   #8 /app/code/local/Mage/Catalog/controllers/CategoryController.php(51): Mage_Core_Model_Abstract->load(5)
   #9 /app/code/local/Mage/Catalog/controllers /CategoryController.php(73): Mage_Catalog_CategoryController->_initCatagory()
   #10 /app/code/local/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_CategoryController->viewAction()
   #11 /app/code/local/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
   #12 /app/code/local/Mage/Core/Controller/Varien/Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
   #13 /app/code/local/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
   #14 /app/Mage.php(596): Mage_Core_Model_App->run(Array)
   #15 index.php(78): Mage::run('', 'store')

This is Magento version 1.4.0.1. I have spent a lot time researching online and I found that many are having similar error but there was no one solution that is working in our case.

The table 'catalog_category_entity_varchar' does exist with entries in the database. It looks like magento is adding prefix to the table even though in the local.xml there is not table prefix specified. I think that is what is breaking.

Any ideas or pointers what you think is the cause of this error? where should I look?


Well, it turns out that there was no table 'catalog_category_entity_varchar' and it is not magento issue, but mysql databases with different versions have different syntax. the solution for my problem is here:

http://www.eliasinteractive.com/blog/magento-database-import-error-using-btree-key-fk_attribute_varchar_entity-entity_id-key-fk_catalo-at-line-9/comment-page-1#comment-3945


try this

cd /magento/var/cache
rm -rf*
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号