Closed chrissm79 closed 8 years ago
I have same error arrive after migrates data magento 1.9.2.1 to magento 2.0.0 version. Admin Product page open with above same error.
Just adding some additional information that can hopefully help.
When I attempt to reindex from the command line I got the following error:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'catalog_product_entity.store_id' in 'field list', query was: SELECT `catalog_product_entity`.`entity_id`, `catalog_product_entity`.`store_id`, `catalog_product_entity`.`value` FROM `catalog_product_entity` WHERE (attribute_id = 98)
I added the column, and got the same error with the 'value' column so I deleted all of the Catalog and Cart Price Rules and it is now able to complete the reindex. However, the issue above is still occurring.
When attempting to utilize the REST API, I get the same error is OP when I attempt to get details on a category, product, or product attributes.
Attempted to follow the same steps with v1.8.1.0 but got the same error.
Steps taken for migrating from v1.7.0.2, v1.8.1.0, & v1.9.2.2: Used data migration tool
We have the same error migrating from 1.7.0.2 to 2.0 migration steps finished without error.
Did you find a solution for this?
this error can be replicated on a fresh install "magento-1.9.2.3-2016-01-20-03-04-11" , totally out of the box with no mods or 3rd party additions. steps taken to reproduce,
My best guess at this point is the install script(s)/upgrade script(s) do not add/alter tables to include the required fields, a pretty big oversight.
Category Products index process unknown error:
exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''' in /mypath/public_html/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /mypath/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /mypath/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /mypath/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /mypath/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#4 /mypath/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DELETE FROM ``', Array)
#5 /mypath/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM ``', Array)
#6 /mypath/public_html/lib/Zend/Db/Adapter/Abstract.php(664): Varien_Db_Adapter_Pdo_Mysql->query('DELETE FROM ``')
#7 /mypath/public_html/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php(941): Zend_Db_Adapter_Abstract->delete(NULL)
#8 /mypath/public_html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll()
#9 /mypath/public_html/app/code/core/Mage/Index/Model/Process.php(212): Mage_Index_Model_Indexer_Abstract->reindexAll()
#10 /mypath/public_html/app/code/core/Mage/Index/Model/Process.php(260): Mage_Index_Model_Process->reindexAll()
#11 /mypath/public_html/shell/indexer.php(168): Mage_Index_Model_Process->reindexEverything()
#12 /mypath/public_html/shell/indexer.php(216): Mage_Shell_Compiler->run()
#13 {main}
Next exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '', query was: DELETE FROM ``' in /mypath/public_html/lib/Zend/Db/Statement/Pdo.php:235
Stack trace:
#0 /mypath/public_html/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#1 /mypath/public_html/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#2 /mypath/public_html/lib/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
#3 /mypath/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('DELETE FROM ``', Array)
#4 /mypath/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(504): Zend_Db_Adapter_Pdo_Abstract->query('DELETE FROM ``', Array)
#5 /mypath/public_html/lib/Zend/Db/Adapter/Abstract.php(664): Varien_Db_Adapter_Pdo_Mysql->query('DELETE FROM ``')
#6 /mypath/public_html/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php(941): Zend_Db_Adapter_Abstract->delete(NULL)
#7 /mypath/public_html/app/code/core/Mage/Index/Model/Indexer/Abstract.php(143): Mage_Catalog_Model_Resource_Category_Indexer_Product->reindexAll()
#8 /mypath/public_html/app/code/core/Mage/Index/Model/Process.php(212): Mage_Index_Model_Indexer_Abstract->reindexAll()
#9 /mypath/public_html/app/code/core/Mage/Index/Model/Process.php(260): Mage_Index_Model_Process->reindexAll()
#10 /mypath/public_html/shell/indexer.php(168): Mage_Index_Model_Process->reindexEverything()
#11 /mypath/public_html/shell/indexer.php(216): Mage_Shell_Compiler->run()
#12 {main}
Hi @chrissm79
I have just migrated 1.7.0.2 (without any extensions) to Magento 2.0.2 and everything is ok Product/order/customer grids shows its data in Admin Panel of Magento 2. I assume you have some extensions that changed your DB in Magento 1 in the way that migration did not pass correctly. There are more causes could be. For example:
@chrissm79 @rakeshjesadiya I can provide meaningful help only if I have exactly the environment you have. The code and DB. Please get in touch with me if you still have the issue "SQL 1103 Incorrect table name ''"
I have the same problem, my database was delivered to Gordon Knoppe.
@toonvd would great if you privately share the DB of Magento 1 with me and I run the migration and see the issue you faced. But before you must clean your DB from passwords (e.g. empty core_config_data, admin_user tables).
@chrissm79 @rakeshjesadiya @toonvd Regarding "SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ''" which occurs in Admin > Products > Catalog after migration. I believe hotfix is to check and fix the field additional_attribute_table of eav_entity_type table in Magento 2 DB
See the screenshot
Hi, I will check this tonight, thanks!
Here is the fix to try out
@victor-v-rad looks fine here! thx! @chrissm79 ok for you too? cc @andidhouse @from-scotland
yes! i can confirm that this fix is fixing the product admin grid.
however it does not fix our problem that we can't access the products in the admin panel - but this is another topic.
Hi @chrissm79 fix was delivered, thank you for contributing
@victor-v-rad I am still facing this issue. Hot fix is not working. Magento version is 2.0.7 and I have migrated data from magento 1.9.2.2 using data migration tool version 2.0.7
a:4:{i:0;s:568:"SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '', query was: SELECT COUNT(DISTINCT main_table.attribute_id) FROM eav_attribute
AS main_table
INNER JOIN eav_entity_type
AS entity_type
ON main_table.entity_type_id = entity_type.entity_type_id
INNER JOIN eav_entity_attribute
ON main_table.attribute_id = eav_entity_attribute.attribute_id
INNER JOIN `AS
additional_tableON main_table.attribute_id = additional_table.attribute_id WHERE (
entity_type_code= 'catalog_product') AND (
additional_table.
is_used_in_grid` = 1)"
Working after reindex and clean cache.
Created a brand new Magento 2 install and migrated data (not settings as I originally thought that was the issue) from Magento 1.7.0.2 store. When I attempt to navigate to the Admin > Products > Catalog I get the following error message:
Stack Trace: