Jump to content

Problema: Duplicate entry '0' for key 'PRIMARY'


Recommended Posts

Hola a todos!
Recurro a ustedes con la esperanza de no tener que reinstalar todo prestashop para solucionarlo.

Tengo el sitio funcionando pero al querer actualizar mediante csv el listado de productos, me da el siguiente error:

 

[PrestaShopDatabaseException]

Duplicate entry '0' for key 'PRIMARY'
 

INSERT INTO `p8_product` (`id_shop_default`, `id_manufacturer`, `id_supplier`, `reference`, `supplier_reference`, `location`, `width`, `height`, `depth`, `weight`, `quantity_discount`, `ean13`, `upc`, `cache_is_pack`, `cache_has_attachments`, `is_virtual`, `id_category_default`, `id_tax_rules_group`, `on_sale`, `online_only`, `ecotax`, `minimal_quantity`, `price`, `wholesale_price`, `unity`, `unit_price_ratio`, `additional_shipping_cost`, `customizable`, `text_fields`, `uploadable_files`, `active`, `redirect_type`, `id_product_redirected`, `available_for_order`, `available_date`, `condition`, `show_price`, `indexed`, `visibility`, `cache_default_attribute`, `advanced_stock_management`, `date_add`, `date_upd`, `pack_stock_type`) VALUES ('1', '0', '0', '7730922069788', '', '', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '2', '1', '0', '0', '0', '1', '776.859504', '0', '', '0', '0', '0', '0', '0', '1', '', '0', '1', '0000-00-00', 'new', '1', '0', 'both', '0', '0', '2015-07-14 12:51:03', '0000-00-00', '3')
at line 646 in file classes/db/Db.php

 

641.             WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
642.         }
643.         elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
644.         {
645.             if ($sql)
646.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
647.             throw new PrestaShopDatabaseException($this->getMsgError());
648.         }
649.     }
650.
651.     /**

 

 

Ya probé un par de opciones de cosas que leí en el foro porque entiendo que es un problema de la base de datos pero no funcionó nada... Alguna idea??
Gracias miles!!

Selva

Link to comment
Share on other sites

Hola,

 

veo que tienes un override de la clase de importación:

AdminImportControllerCore->productImport - [line 3345 - override/controllers/AdminImportController.php]

Lo has hecho tu? Es algún módulo? Revisa las claves primarias de esa tabla.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...