After migrate, error in checkout for multi stores

Hi, I am getting error as following, 
[2019-09-09 01:51:56] main.CRITICAL: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ”, query was: INSERT INTO “ () VALUES () {“exception”:”[object] (Zend_Db_Statement_Exception(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ”, query was: INSERT INTO “ () VALUES () at /var/www/html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110, PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ” at /var/www/html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:91)”} []
 
I read through the article, this may cause by some tables or columns missing rite? can you please guide me in details in order to resolve this issue.
I am running multiple stores, only default store able to place order and make payment, the rest of the stores are facing error. Please help. We are urgent for this. Thanks.
 

5 answers

Profile photo of ubdev Staff 46660.00 $tone September 9, 2019
Public

Hi there, 
Please navigate to your website and store management panel, open each migrated websites, stores and store views, then re-save. If the issue still persists then let us know. 
Regards,
Ubertheme team

#1
Profile photo of Mall Staff 118860.00 $tone September 9, 2019
Public

Hi there,

[2019-09-09 01:51:56] main.CRITICAL: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ”, query was: INSERT INTO “ () VALUES () {“exception”:”[object] (Zend_Db_Statement_Exception(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name ”, query was: INSERT INTO “ () VALUES () at /var/www/html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php:110,

The root cause of that issue was that your M2 database had missing sequence tables for the store view which caused that issue.

You can run the below SQL in your M2 database to see that the needed sequence tables were missing for the other store views which do not belong to the default store.

Select * from store;
Select * From sales_sequence_meta;
Select * From sales_sequence_meta where entity_type='order';
Show tables like '%sequence_order%';

Here’re what I checked at our end:
You database has these Store view IDs: http://prntscr.com/p3nreh
And the needed sequence tables wre missing for that Store IDs except for the default store views: 
http://prntscr.com/p3nrwc
http://prntscr.com/p3nsjy

And that is the root cause of the checkout’s issue you mentioned.
 
So, please try to follow the suggestion in my reply #1 once again (for each migrated store view, please open it and click the Save button in the Stores management of your back-end). This step is to let M2 re-generate the missing sequence tables as I mentioned for your store views.

Once done, please reindex the data and clean M2 cache. And check the issue on checkout you mentioned again. 
 
Regards,
Mall.
 

#3
Profile photo of ozhut 160.00 $tone September 10, 2019
Public

Hi, thanks for reply, i had tried to resave store view, store and websites, then reindex and clear cache, but no tables generated. If i create new store view, new store and new website then after reindex and clear cache, new tables is added in.
For the migrated store view, store and websites are unable to create the related tables. Please help.

#4
Profile photo of ubdev Staff 46660.00 $tone September 10, 2019
Public

Hi there, 

 For the migrated store view, store and websites are unable to create the related tables. Please help.

We’re not quite sure how you did manually make changes to your database after migration. As explained in our reply 3, the needed sequence tables were missing.
 
Some of our users coped with the same issue, and the workaround we suggested did work. For example, you can check this case for reference: https://www.ubertheme.com/question/table-name-blank-and-sql-error-when-placing-order/
 
Under this circumstance, we’re afraid you have to manually update the needed sequence_meta table for each store view which is missing as explained in reply #3.
 
Regards,
Ubertheme team

#5

Please login or Register to Submit Answer

Written By

Comments