flagshipcompany / flagship-for-prestashop

MIT License
0 stars 0 forks source link

Module brought down our test site #8

Open joecoolio66 opened 2 days ago

joecoolio66 commented 2 days ago

We tried installing your module on PS 8.2 with PHP 8.1 by installing the flagship-for-prestashop.zip file on the backoffice module page. The module installed fine, but when we clicked configure we got a 500 error. After enabling debug, we get the following stack trace when trying to access the back office:

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '321-565-1' for key 'PRIMARY' at line 153 in file classes/db/DbPDO.php

  1. protected function _query($sql)
  2. {
  3. try {
  4. return $this->link->query($sql);
  5. } catch (PDOException $exception) {
  6. throw new PrestaShopException($exception->getMessage(), (int) $exception->getCode(), $exception);
  7. }
  8. }
  9. /**
    • Returns the next row from the result set.

DbPDOCore->_query - [line 377 - classes/db/Db.php] - [1 Arguments] Argument [0] INSERT INTO ss_dbprefixhook_module (id_module, id_hook, id_shop, position) VALUES ('321', '565', '1', '2') DbCore->query - [line 744 - classes/db/Db.php] - [1 Arguments] Argument [0] INSERT INTO ss_dbprefixhook_module (id_module, id_hook, id_shop, position) VALUES ('321', '565', '1', '2') DbCore->q - [line 477 - classes/db/Db.php] - [2 Arguments] Argument [0] INSERT INTO ss_dbprefixhook_module (id_module, id_hook, id_shop, position) VALUES ('321', '565', '1', '2') Argument [1] 1 DbCore->insert - [line 619 - classes/Hook.php] - [2 Arguments] Argument [0] ss_dbprefixhook_module Argument [1] Array ( [0] => Array ( [id_module] => 321 [id_hook] => 565 [id_shop] => 1 [position] => 2 )

)

It looks like the module is trying to insert VALUES ('321', '565', '1', '2') when VALUES ('321', '565', '1', '1') already exists and the combination of the first three columns in the hook_module table IS the primary key.

Perhaps this module does not work for PS 8+?

radua commented 2 days ago

The module is not compatible with PS 8. It's only compatible with PS 1.7.x

joecoolio66 commented 2 days ago

Any plans to make it compatible? I don't think it would take much. Lots of potential customers on PS 8