Closed mariuszsienkiewicz closed 5 months ago
Hi @mariuszsienkiewicz and @pipo1000, thanks for reporting this.
We didn't run into this issue ourselves until I tried deleting everything and starting over from scratch... Now I get this error too on my development environment. Trying to install another time does not give me this error anymore, though.
We'll work on fixing this issue, but in the meantime, @pipo1000, I'm curious to know if trying the installation again works for you too.
Hi @mariuszsienkiewicz and @pipo1000, thanks for reporting this.
We didn't run into this issue ourselves until I tried deleting everything and starting over from scratch... Now I get this error too on my development environment. Trying to install another time does not give me this error anymore, though.
We'll work on fixing this issue, but in the meantime, @pipo1000, I'm curious to know if trying the installation again works for you too.
When I create an new installation with the Docker Prestashop image, install the plugin, I get the exception, I remove the plugin, I install it again, and now the installation succeeded without an exception.
However, when I then try to enter my API key I get an error;
message An exception occurred while executing 'SELECT t0.carrier_id AS carrier_id_1, t0.myparcel_carrier AS myparcel_carrier_2, t0.date_upd AS date_upd_3, t0.date_add AS date_add_4 FROM ps_myparcelnl_carrier_mapping t0 WHERE t0.myparcel_carrier = ? LIMIT 1' with params ["postnl"]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'ps81empty.ps_myparcelnl_carrier_mapping' doesn't exist
Sadly the ps_myparcel* tables do not exist in my database. Deleting the plugin again with 'optional; remove the plugin directory' and installing it for the third time will create the tables.
However; now I get the following error when I try to add my API key;
An exception occurred while executing 'INSERT INTO ps_myparcelnl_carrier_mapping (carrier_id, myparcel_carrier, date_upd, date_add) VALUES (?, ?, ?, ?)' with params [13, "postnl", "2024-06-09 16:51:33", "2024-06-09 16:51:33"]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'postnl' for key 'myparcel_carrier'
So I am not having much luck with this plugin.
Also I downloaded and installed the myparcelnl-prestashop-4.0.0-beta.3.zip however after installing it, it will present itself as 'MyParcelNL v4.0.0-be - by MyParcel'.
Also the webhooks are not created, they all have a red crosses in front of the them, however when I click on the 'create webhook' button I get the following exception, and they still have red crosses.
message | "Request failed. Status code: 400. Errors: Webhook validation error (request_id: 1717944930.66476665c262a2493)"
Hi @mariuszsienkiewicz, now that I think of it and realize this is also about PostNL, this is most likely the same problem as myparcelnl/pdk#284. I will close as duplicate, but feel free to reopen if this turns out to happen with other carriers as well.
Version check
PrestaShop version
8.1.5
PHP version
8.1.28
What went wrong?
I have tried to test the myparcelnl on stock PrestaShop 8.1.5 installation.
There is an issue while trying to install the module for the first time.
MyParcelNL\PrestaShop\Service\ModuleService
registerHooks
method is executed twice - in the install process and then in theenable()
(MyParcelNL
class) which causes integrity violuation error.Log below.
Reproduction steps
Relevant log output
Additional context
No response