mnemos Posted June 26, 2013 Share Posted June 26, 2013 Hi, I'm using PrestaShop version: 1.5.4.1 In the attributes and Values menu, I try to add these things. I add attributes, it all works fine. When I try to add values to those attributes, no matter what I add as a value I get this: [PrestaShopDatabaseException] Duplicate entry '8-1' for key 'PRIMARY' INSERT INTO `ps_attribute_shop` (`id_attribute`, `id_shop`) VALUES ('8', '1') at line 607 in file classes/db/Db.php 601. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);602. }603. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))604. {605. if ($sql)[color=#F20000][b]606. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');[/b][/color]607. throw new PrestaShopDatabaseException($this->getMsgError());608. }609. }610. 611. /**[/font][/color][b]DbCore->displayError[/b] - [line 307 - classes/db/Db.php] - [1 Arguments] [b]DbCore->query[/b] - [line 581 - classes/db/Db.php] - [1 Arguments] [b]DbCore->q[/b] - [line 372 - classes/db/Db.php] - [2 Arguments] [b]DbCore->insert[/b] - [line 480 - classes/ObjectModel.php] - [3 Arguments] [b]ObjectModelCore->add[/b] - [line 10 - override/classes/ObjectModel.php] - [2 Arguments] [b]ObjectModel->add[/b] - [line 111 - classes/Attribute.php] - [2 Arguments] [b]AttributeCore->add[/b] - [line 680 - classes/controller/AdminController.php] - [size=3][0 Argument][/size] [b]AdminControllerCore->processAdd[/b] - [line 387 - controllers/admin/AdminAttributesGroupsController.php] - [size=3][0 Argument][/size] [b]AdminAttributesGroupsControllerCore->processAdd[/b] - [line 572 - controllers/admin/AdminAttributesGroupsController.php] - [size=3][0 Argument][/size] [b]AdminAttributesGroupsControllerCore->processSave[/b] - [line 629 - controllers/admin/AdminAttributesGroupsController.php] - [1 Arguments] [b]AdminAttributesGroupsControllerCore->postProcess[/b] - [line 158 - classes/controller/Controller.php] - [size=3][0 Argument][/size] [b]ControllerCore->run[/b] - [line 349 - classes/Dispatcher.php] - [size=3][0 Argument][/size] [b]DispatcherCore->dispatch[/b] - [line 50 - admin0519/index.php] - [size=3][0 Argument][/size] [size=3]Any ideas?[/size] Link to comment Share on other sites More sharing options...
mnemos Posted June 27, 2013 Author Share Posted June 27, 2013 Anyone? It seems there are 2 unique fields in this table, generating the issue. Link to comment Share on other sites More sharing options...
mnemos Posted June 27, 2013 Author Share Posted June 27, 2013 Problem solved, dropping the index from id_shop fixed the issue. Hopefully the devs will fix this error in a further upgrade. Link to comment Share on other sites More sharing options...
maio Posted October 10, 2013 Share Posted October 10, 2013 (edited) hey mnemos- I've experienced something similar, instead of.. Duplicate entry '8-1' for key 'PRIMARY' i got stuck with Duplicate entry '1-1' for key 'PRIMARY' while importing combos.. logically in my case I had to eliminate the prod-id column ... (it give me confirmation message but no combinations are displayed) still ps v1.5.4.1 I'll test it a little bit.... Edited October 10, 2013 by maio (see edit history) Link to comment Share on other sites More sharing options...
Palido Posted November 11, 2014 Share Posted November 11, 2014 same problem here has anyone a solution? Link to comment Share on other sites More sharing options...
Recommended Posts