selva.ahpinsumos Posted July 14, 2015 Share Posted July 14, 2015 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. /** DbCore->displayError - [line 340 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 620 - classes/db/Db.php] - [1 Arguments] DbCore->q - [line 405 - classes/db/Db.php] - [2 Arguments] DbCore->insert - [line 486 - classes/ObjectModel.php] - [3 Arguments] ObjectModelCore->add - [line 518 - classes/Product.php] - [2 Arguments] ProductCore->add - [line 1549 - override/controllers/AdminImportController.php] - [1 Arguments] AdminImportControllerCore->productImport - [line 3345 - override/controllers/AdminImportController.php] AdminImportControllerCore->postProcess - [line 171 - classes/controller/Controller.php] ControllerCore->run - [line 373 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 54 - admin/index.php] 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 More sharing options...
joseantgv Posted July 14, 2015 Share Posted July 14, 2015 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 More sharing options...
selva.ahpinsumos Posted July 14, 2015 Author Share Posted July 14, 2015 No sé que es eso, puede ser algun modulo pero no se cual... Link to comment Share on other sites More sharing options...
Enrique Gómez Posted July 14, 2015 Share Posted July 14, 2015 Comprueba que en la tabla también este el auto_increment (a parte de la clave primaria) Link to comment Share on other sites More sharing options...
selva.ahpinsumos Posted July 14, 2015 Author Share Posted July 14, 2015 Cuando quiero modificar a Auto increment me da este error: Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now