Sign in to follow this  
JayD

Magento Order was not created. Reason: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '', query was: INSERT INTO `` () VALUES ()

Recommended Posts

We've been getting this error all morning on Magento 2.2:

Magento Order was not created. Reason: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '', query was: INSERT INTO `` () VALUES (

Any help will be appreciated.

Edited by JayD

Share this post


Link to post
Share on other sites

I debug the issue. For my case, It was due incomplete process during store creation because of heavy data. I found an entry is missing in the 'sales_sequence_meta' table for that store. I tried by adding it manually and able to place order successfully.

image.png.b9fb81e3351d50207668425d6802bac9.png

Check entry for the relevant store.

Share this post


Link to post
Share on other sites

Hi all,

Issue was solved by this thread:
https://minhducnho.wordpress.com/2017/10/24/magento-2-fixed-error-when-place-order-sqlstate42000-syntax-error-or-access-violation-1103-incorrect-table-name/

You have to change vendor/magento/module-sales/etc/events.xml with the code provided in the url.
After that just go to stores -> all stores , go to storeview and click save. Real easy if you know it.

Good luck all ;-)

Steve

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this