Title: error insert db
Last modified: February 10, 2022

---

# error insert db

 *  Resolved [dededey](https://wordpress.org/support/users/dededey/)
 * (@dededey)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/error-insert-db/)
 * hi in my log got this error
 * `[10-Feb-2022 08:59:50 UTC] WordPress errore sul database Duplicate entry '59'
   for key 'PRIMARY' per la query INSERT INTO`wp_shopmagic_cart`(`id`,`status`,`
   last_modified`,`created`,`items`,`coupons`,`fees`,`shipping_tax_total`,`shipping_total`,`
   total`,`token`,`currency`,`user_id`,`guest_id`) VALUES ('59', 'active', '2022-
   02-10 8:59:50', '2022-02-10 8:59:50', '{\"f4e116dbf983358eee2619a452c97ca9\":{\"
   key\":\"f4e116dbf983358eee2619a452c97ca9\",\"product_id\":595,\"variation_id\":
   753,\"variation\":{\"attribute_classi-aggiuntive\":\"senza classi aggiuntive\"},\"
   quantity\":1,\"data_hash\":\"50ea724ed0bfb1e56aee9bf26ee43039\",\"line_tax_data\":{\"
   subtotal\":{\"2\":63},\"total\":{\"2\":63}},\"line_subtotal\":300,\"line_subtotal_tax\":
   63,\"line_total\":300,\"line_tax\":63,\"data\":{}}}', '[]', '[]', '0', '0', '
   363', '5c88681b82bd31a7d920f9ac4975b5be', 'EUR', 122, NULL) fatta da shutdown_action_hook,
   do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WPDesk\ShopMagicCart\
   Interceptor\CartInterceptor->save_cart, WPDesk\ShopMagicCart\Cart\CartTable->
   save, WPDesk\ShopMagic\Database\Abstraction\AbstractSingleTable->save, W3TC\DbCache_WpdbNew-
   >insert, W3TC\DbCache_WpdbInjection_QueryCaching->insert, W3TC\_CallUnderlying-
   >insert, W3TC\DbCache_WpdbNew->insert, W3TC\DbCache_WpdbInjection->insert, W3TC\
   DbCache_WpdbNew->default_insert, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection-
   >query, W3TC\DbCache_WpdbNew->default_query`

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Support [damianmachnik](https://wordpress.org/support/users/damianmachnik/)
 * (@damianmachnik)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/error-insert-db/#post-15350718)
 * Hi [@dededey](https://wordpress.org/support/users/dededey/)
 * Thank you very much for sending us this log. We’ll take a look at it, and fix
   in one of the next plugin updates.
 * Have a nice day!
 *  Thread Starter [dededey](https://wordpress.org/support/users/dededey/)
 * (@dededey)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/error-insert-db/#post-15350838)
 * I update to the new version today, I will check if the problem persists
 * e
 *  Thread Starter [dededey](https://wordpress.org/support/users/dededey/)
 * (@dededey)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/error-insert-db/#post-15355051)
 * still having same problem after update
 * `[11-Feb-2022 12:44:34 UTC] WordPress errore sul database Duplicate entry '71'
   for key 'PRIMARY' per la query INSERT INTO`wp_shopmagic_cart`(`id`,`status`,`
   last_modified`,`created`,`items`,`coupons`,`fees`,`shipping_tax_total`,`shipping_total`,`
   total`,`token`,`currency`,`user_id`,`guest_id`) VALUES ('71', 'active', '2022-
   02-11 12:44:34', '2022-02-11 12:44:34', '{\"f4e116dbf983358eee2619a452c97ca9\":{\"
   key\":\"f4e116dbf983358eee2619a452c97ca9\",\"product_id\":595,\"variation_id\":
   753,\"variation\":{\"attribute_classi-aggiuntive\":\"senza classi aggiuntive\"},\"
   quantity\":1,\"data_hash\":\"50ea724ed0bfb1e56aee9bf26ee43039\",\"line_tax_data\":{\"
   subtotal\":{\"2\":63},\"total\":{\"2\":63}},\"line_subtotal\":300,\"line_subtotal_tax\":
   63,\"line_total\":300,\"line_tax\":63,\"data\":{}}}', '[]', '[]', '0', '0', '
   363', 'c286d9c9703851b77ee99935966aa07d', 'EUR', 151, NULL) fatta da shutdown_action_hook,
   do_action('shutdown'), WP_Hook->do_action, WP_Hook->apply_filters, WPDesk\ShopMagicCart\
   Interceptor\CartInterceptor->save_cart, WPDesk\ShopMagicCart\Cart\CartTable->
   save, WPDesk\ShopMagic\Database\Abstraction\AbstractSingleTable->save, W3TC\DbCache_WpdbNew-
   >insert, W3TC\DbCache_WpdbInjection_QueryCaching->insert, W3TC\_CallUnderlying-
   >insert, W3TC\DbCache_WpdbNew->insert, W3TC\DbCache_WpdbInjection->insert, W3TC\
   DbCache_WpdbNew->default_insert, W3TC\DbCache_WpdbNew->query, W3TC\DbCache_WpdbInjection-
   >query, W3TC\DbCache_WpdbNew->default_query`
 * this seems to broke the autologin after registration
 *  Plugin Support [damianmachnik](https://wordpress.org/support/users/damianmachnik/)
 * (@damianmachnik)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/error-insert-db/#post-15355322)
 * Hi [@dededey](https://wordpress.org/support/users/dededey/)
 * You wrote to us 1 day ago, and there was no plugin update since then. As I wrote
   earlier, we are aware of this issue, and it will be fixed in one of the next 
   plugin updates. Not necessarily in the next one.
 * I’ll notify you one fix will be released. Thank you for your patience.
 * Have a nice weekend.
 *  Plugin Support [damianmachnik](https://wordpress.org/support/users/damianmachnik/)
 * (@damianmachnik)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-insert-db/#post-15417845)
 * Hi [@dededey](https://wordpress.org/support/users/dededey/)
 * Just a quick update. We’ve just released ShopMagic 2.37, but it does not contain
   a fix for this issue.
 * We need a few more days to test it, and most likely it will be released as a 
   fix.
 * I’ll lt you know.
 * Thank you for your patience.
 *  Plugin Contributor [Bartek](https://wordpress.org/support/users/bartj/)
 * (@bartj)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-insert-db/#post-15418671)
 * Hello [@dededey](https://wordpress.org/support/users/dededey/)!
 * As we are working on the issue, I’d like to ask you to find out which Customer
   in your store has ID 151 (you can find this in Users section in WordPress menu)
   and tell me if customer with ID 151 is associated with Cart ID 71 (you can find
   this in ShopMagic Carts page in admin area).
 * If the cart no longer exists, you may try with Cart ID 51 and User ID 122.
 * Could you check this for us?
 * Best regards,
    Bartek
 *  Thread Starter [dededey](https://wordpress.org/support/users/dededey/)
 * (@dededey)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-insert-db/#post-15418792)
 * hi, sorry but I don’t have no more all the cards, because the problem was when
   I was testing the site, the all orders and cards was reset.
 * e
 *  Plugin Contributor [Bartek](https://wordpress.org/support/users/bartj/)
 * (@bartj)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-insert-db/#post-15445585)
 * Hi [@dededey](https://wordpress.org/support/users/dededey/)!
 * We’ve recently update our plugin solving the issue.
 * Check it out and confirm, if the issue is solved.
 * Best regards!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘error insert db’ is closed to new replies.

 * ![](https://ps.w.org/shopmagic-for-woocommerce/assets/icon-256x256.png?rev=2847401)
 * [ShopMagic - email automation](https://wordpress.org/plugins/shopmagic-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shopmagic-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shopmagic-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/shopmagic-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shopmagic-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shopmagic-for-woocommerce/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [Bartek](https://wordpress.org/support/users/bartj/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/error-insert-db/#post-15445585)
 * Status: resolved