Title: Duplicate Entry in errorlog
Last modified: July 12, 2024

---

# Duplicate Entry in errorlog

 *  [EmanuelHut](https://wordpress.org/support/users/emanuelhut/)
 * (@emanuelhut)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/duplicate-entry-in-errorlog/)
 * Hi. 
   Since installing the plugin the errorlog is getting filled with these logs
   for “Duplicate Entry”.
 * [Fri Jul 12 12:44:30.685342 2024] [proxy_fcgi:error] [pid 3843870:tid 140292875343424][
   client 176.121.57.40:0] AH01071: Got error ‘PHP message: WordPress database error
   Duplicate entry ‘1670532685’ for key ‘PRIMARY’ for query INSERT INTO `wpnp_phplugins_cart_contents`(`
   cart_id`, `contents`, `ts`) VALUES (1670532685, ‘{\”6065782975902d2aab2e0a8709a2e8e6\”:{\”
   key\”:\”6065782975902d2aab2e0a8709a2e8e6\”,\”product_id\”:72791,\”variation_id\”:
   72795,\”variation\”:{\”attribute_pa_maat\”:\”m\”},\”quantity\”:1,\”data_hash\”:\”
   8e67cb2c9314dc5d37fdec78f9ed4217\”,\”line_tax_data\”:{\”subtotal\”:[],\”total\”:[]},\”
   line_subtotal\”:99.95,\”line_subtotal_tax\”:0,\”line_total\”:99.95,\”line_tax\”:
   0,\”data\”:{}},\”9d6dd83c728ed9b105f68313c475cb58\”:{\”key\”:\”9d6dd83c728ed9b105f68313c475cb58\”,\”
   product_id\”:76670,\”variation_id\”:76675,\”variation\”:{\”attribute_pa_maat\”:\”
   l\”},\”quantity\”:1,\”data_hash\”:\”864e8ec6f5442775f0734d0766b2639b\”,\”line_tax_data\”:{\”
   subtotal\”:[],\”total\”:[]},\”line_subtotal\”:79.95,\”line_subtotal_tax\”:0,\”
   line_total\”:79.95,\”line_tax\”:0,\”data\”:{}},\”dc916b749f32d6e99ecae8836ecbba93\”:{\”
   key\”:\”dc916b74…’, referer: [https://URL_REDACTED.com/product-categorie/kleding/?orderby=popularity](https://URL_REDACTED.com/product-categorie/kleding/?orderby=popularity)
   [
   Fri Jul 12 12:44:35.644160 2024] [proxy_fcgi:error] [pid 3843870:tid 140292892128832][
   client 176.121.57.40:0] AH01071: Got error ‘PHP message: WordPress database error
   Duplicate entry ‘1670532685’ for key ‘PRIMARY’ for query INSERT INTO `wpnp_phplugins_cart_contents`(`
   cart_id`, `contents`, `ts`) VALUES (1670532685, ‘{\”6065782975902d2aab2e0a8709a2e8e6\”:{\”
   key\”:\”6065782975902d2aab2e0a8709a2e8e6\”,\”product_id\”:72791,\”variation_id\”:
   72795,\”variation\”:{\”attribute_pa_maat\”:\”m\”},\”quantity\”:1,\”data_hash\”:\”
   8e67cb2c9314dc5d37fdec78f9ed4217\”,\”line_tax_data\”:{\”subtotal\”:[],\”total\”:[]},\”
   line_subtotal\”:99.95,\”line_subtotal_tax\”:0,\”line_total\”:99.95,\”line_tax\”:
   0,\”data\”:{}},\”9d6dd83c728ed9b105f68313c475cb58\”:{\”key\”:\”9d6dd83c728ed9b105f68313c475cb58\”,\”
   product_id\”:76670,\”variation_id\”:76675,\”variation\”:{\”attribute_pa_maat\”:\”
   l\”},\”quantity\”:1,\”data_hash\”:\”864e8ec6f5442775f0734d0766b2639b\”,\”line_tax_data\”:{\”
   subtotal\”:[],\”total\”:[]},\”line_subtotal\”:79.95,\”line_subtotal_tax\”:0,\”
   line_total\”:79.95,\”line_tax\”:0,\”data\”:{}},\”dc916b749f32d6e99ecae8836ecbba93\”:{\”
   key\”:\”dc916b74…’, referer: [https://URL_REDACTED.com/product-categorie/kleding/?orderby=popularity](https://URL_REDACTED.com/product-categorie/kleding/?orderby=popularity)[
   Fri Jul 12 12:44:47.760930 2024] [proxy_fcgi:error] [pid 3851319:tid 140293009561152][
   client 176.121.57.40:0] AH01071: Got error ‘PHP message: WordPress database error
   Duplicate entry ‘1670532685’ for key ‘PRIMARY’ for query INSERT INTO `wpnp_phplugins_cart_contents`(`
   cart_id`, `contents`, `ts`) VALUES (1670532685, ‘{\”6065782975902d2aab2e0a8709a2e8e6\”:{\”
   key\”:\”6065782975902d2aab2e0a8709a2e8e6\”,\”product_id\”:72791,\”variation_id\”:
   72795,\”variation\”:{\”attribute_pa_maat\”:\”m\”},\”quantity\”:1,\”data_hash\”:\”
   8e67cb2c9314dc5d37fdec78f9ed4217\”,\”line_tax_data\”:{\”subtotal\”:[],\”total\”:[]},\”
   line_subtotal\”:99.95,\”line_subtotal_tax\”:0,\”line_total\”:99.95,\”line_tax\”:
   0,\”data\”:{}},\”9d6dd83c728ed9b105f68313c475cb58\”:{\”key\”:\”9d6dd83c728ed9b105f68313c475cb58\”,\”
   product_id\”:76670,\”variation_id\”:76675,\”variation\”:{\”attribute_pa_maat\”:\”
   l\”},\”quantity\”:1,\”data_hash\”:\”864e8ec6f5442775f0734d0766b2639b\”,\”line_tax_data\”:{\”
   subtotal\”:[],\”total\”:[]},\”line_subtotal\”:79.95,\”line_subtotal_tax\”:0,\”
   line_total\”:79.95,\”line_tax\”:0,\”data\”:{}},\”dc916b749f32d6e99ecae8836ecbba93\”:{\”
   key\”:\”dc916b74…’, referer: [https://URL_REDACTED.com/product-categorie/kleding/?orderby=popularity](https://URL_REDACTED.com/product-categorie/kleding/?orderby=popularity)[
   Fri Jul 12 12:44:50.577907 2024] [proxy_fcgi:error] [pid 3851319:tid 140289830266432][
   client 176.121.57.40:0] AH01071: Got error ‘PHP message: WordPress database error
   Duplicate entry ‘1670532685’ for key ‘PRIMARY’ for query INSERT INTO `wpnp_phplugins_cart_contents`(`
   cart_id`, `contents`, `ts`) VALUES (1670532685, ‘{\”6065782975902d2aab2e0a8709a2e8e6\”:{\”
   key\”:\”6065782975902d2aab2e0a8709a2e8e6\”,\”product_id\”:72791,\”variation_id\”:
   72795,\”variation\”:{\”attribute_pa_maat\”:\”m\”},\”quantity\”:1,\”data_hash\”:\”
   8e67cb2c9314dc5d37fdec78f9ed4217\”,\”line_tax_data\”:{\”subtotal\”:[],\”total\”:[]},\”
   line_subtotal\”:99.95,\”line_subtotal_tax\”:0,\”line_total\”:99.95,\”line_tax\”:
   0,\”data\”:{}},\”9d6dd83c728ed9b105f68313c475cb58\”:{\”key\”:\”9d6dd83c728ed9b105f68313c475cb58\”,\”
   product_id\”:76670,\”variation_id\”:76675,\”variation\”:{\”attribute_pa_maat\”:\”
   l\”},\”quantity\”:1,\”data_hash\”:\”864e8ec6f5442775f0734d0766b2639b\”,\”line_tax_data\”:{\”
   subtotal\”:[],\”total\”:[]},\”line_subtotal\”:79.95,\”line_subtotal_tax\”:0,\”
   line_total\”:79.95,\”line_tax\”:0,\”data\”:{}},\”dc916b749f32d6e99ecae8836ecbba93\”:{\”
   key\”:\”dc916b74…’, referer: [https://URL_REDACTED.com/product-categorie/kleding/?orderby=popularity](https://URL_REDACTED.com/product-categorie/kleding/?orderby=popularity)

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

 *  Anonymous User
 * (@anonymized-21152406)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/duplicate-entry-in-errorlog/#post-17886511)
 * Hi there,
 * Have you made any structural changes to the database tables created by the plugin?
   The `phplugins_cart_contents` table’s `cart_id` column is set to be a `KEY` but
   not unique, so you shouldn’t be getting errors about duplicate values in this
   column unless the column has a different key than it is supposed to have.
 *  Thread Starter [EmanuelHut](https://wordpress.org/support/users/emanuelhut/)
 * (@emanuelhut)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/duplicate-entry-in-errorlog/#post-17898316)
 * Hi!
 * I didn’t make any changes to the database or the plugin.
   When i look in the database
   the `cart_id` field is set to `Primary Key` and `auto_increment`
 * It’s just a default install 🙂
 *  Anonymous User
 * (@anonymized-21152406)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/duplicate-entry-in-errorlog/#post-17913737)
 * Hi,
 * In the `wpnp_phplugins_carts` table, the `cart_id` column is the primary key,
   but it shouldn’t be a primary key in the `wpnp_phplugins_cart_contents` table
   referenced by the errors you’re seeing. If it is, you could fix the problem by
   removing the primary key and auto increment, and just setting it to be a non-
   unique key. I don’t know how it would have become a primary key; I’ve checked
   the database table creation SQL (`includes/setup.php`) and it’s just set to be
   a `KEY`.
 *  [gmeligio](https://wordpress.org/support/users/gmeligio/)
 * (@gmeligio)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/duplicate-entry-in-errorlog/#post-18116401)
 * I was having this exact issue and I fixed it by
 *     ```wp-block-code
       ALTER TABLE wpprefix_phplugins_cart_contents DROP PRIMARY KEY;
       ```
   
 * I installed the plugin normally from the Plugins page inside the admin panel 
   so I don’t understand how the primary key was set in the first place if it’s 
   not intended. In my case, after solving this issue, it also solved [https://wordpress.org/support/topic/shows-only-first-added-item/](https://wordpress.org/support/topic/shows-only-first-added-item/)
 *  [resolveissue](https://wordpress.org/support/users/resolveissue/)
 * (@resolveissue)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/duplicate-entry-in-errorlog/#post-18166101)
 * I am having the same issue.WIll try this fix now.
 *  Anonymous User
 * (@anonymized-21152406)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/duplicate-entry-in-errorlog/#post-18167708)
 * This issue should be resolved in version 1.0.11 of the plugin. When installed,
   that version should automatically remove the problematic primary key (if it is
   still present) and replace it with a foreign key. If you encounter any further
   issues like after this update, please let me know.

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

The topic ‘Duplicate Entry in errorlog’ is closed to new replies.

 * ![](https://ps.w.org/live-carts-for-woocommerce/assets/icon-256x256.png?rev=3511177)
 * [Live Carts for WooCommerce: Track Real-Time, Abandoned, and Converted Carts!](https://wordpress.org/plugins/live-carts-for-woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/live-carts-for-woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/live-carts-for-woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/live-carts-for-woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/live-carts-for-woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/live-carts-for-woocommerce/reviews/)

 * 6 replies
 * 4 participants
 * Last reply from: Anonymous User
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/duplicate-entry-in-errorlog/#post-18167708)
 * Status: not resolved