myparcelnl / prestashop

PrestaShop module to integrate with MyParcel NL and BE
https://developer.myparcel.nl/nl/documentatie/11.prestashop.html
10 stars 5 forks source link

Module 4.0.0-beta3 does not install on fresh Prestashop 8.1.4 docker container #254

Closed pipo1000 closed 3 months ago

pipo1000 commented 4 months ago

Module version

4.0.0-beta3

PrestaShop version

1.8.4

PHP version

8.1.27

What went wrong?

Module does not install on fresh Prestashop 8.1.4 docker container

Reproduction steps

Install Docker container;

docker run -dti  --name ps81empty -p 8010:80 --link mariadb \
-e DB_SERVER=mariadb \
-e DB_NAME=ps81empty \
-e DB_PASSWD=password \
-e PS_INSTALL_AUTO=1 \
-e PS_COUNTRY=nl \
-e PS_ERASE_DB=1 \
-e PS_INSTALL_DB=1 \
-e PS_DOMAIN=192.168.2.45:8010 \
-e ADMIN_MAIL=some@domain.nl \
-e ADMIN_PASSWD=password \
prestashop/prestashop:8.1.4
docker exec -ti ps81empty bash
mv admin admin123

Login with admin on http://192.168.2.45:8010/admin123

Install module myparcelnl-prestashop-4.0.0-beta.3.zip; Module Manager -> Upload module

I get an errror during installing the module;

Installation of module myparcelnl failed. Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '68-949-1' for key 'PRIMARY'

Stack trace:
#0 /var/www/html/classes/db/Db.php(377): DbPDOCore->_query('INSERT INTO `ps...')
#1 /var/www/html/classes/db/Db.php(744): DbCore->query('INSERT INTO `ps...')
#2 /var/www/html/classes/db/Db.php(477): DbCore->q('INSERT INTO `ps...', true)
#3 /var/www/html/classes/Hook.php(619): DbCore->insert('ps_hook_module', Array)
#4 /var/www/html/classes/module/Module.php(1061): HookCore::registerHook(Object(MyParcelNL), 'actionObjectCus...', Array)
#5 /var/www/html/modules/myparcelnl/src/Service/ModuleService.php(52): ModuleCore->registerHook('actionObjectCus...')
#6 /var/www/html/modules/myparcelnl/vendor/myparcelnl/pdk/src/Base/Facade.php(25): MyParcelNL\PrestaShop\Service\ModuleService->registerHooks()
#7 /var/www/html/modules/myparcelnl/src/Pdk/Installer/Service/PsInstallerService.php(83): MyParcelNL\Pdk\Base\Facade::__callStatic('registerHooks', Array)
#8 /var/www/html/modules/myparcelnl/vendor/myparcelnl/pdk/src/App/Installer/Service/InstallerService.php(52): MyParcelNL\PrestaShop\Pdk\Installer\Service\PsInstallerService->executeInstallation(Array)
#9 /var/www/html/modules/myparcelnl/src/Pdk/Installer/Service/PsInstallerService.php(50): MyParcelNL\Pdk\App\Installer\Service\InstallerService->install(Array)
#10 /var/www/html/modules/myparcelnl/vendor/myparcelnl/pdk/src/Base/Facade.php(25): MyParcelNL\PrestaShop\Pdk\Installer\Service\PsInstallerService->install(Object(MyParcelNL))
#11 /var/www/html/modules/myparcelnl/myparcelnl.php(101): MyParcelNL\Pdk\Base\Facade::__callStatic('install', Array)
#12 /var/www/html/modules/myparcelnl/myparcelnl.php(162): MyParcelNL->{closure}()
#13 /var/www/html/modules/myparcelnl/myparcelnl.php(102): MyParcelNL->withErrorHandling(Object(Closure))
#14 /var/www/html/src/Adapter/Module/Module.php(271): MyParcelNL->install()
#15 /var/www/html/src/Core/Module/ModuleManager.php(109): PrestaShop\PrestaShop\Adapter\Module\Module->onInstall()
#16 /var/www/html/src/PrestaShopBundle/Controller/Admin/Improve/ModuleController.php(384): PrestaShop\PrestaShop\Core\Module\ModuleManager->install('myparcelnl', '/tmp/phpU4qLiq')
#17 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(169): PrestaShopBundle\Controller\Admin\Improve\ModuleController->importModuleAction(Object(Symfony\Component\HttpFoundation\Request))
#18 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php(81): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#19 /var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(201): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, false)
#20 /var/www/html/admin123/index.php(84): Symfony\Component\HttpKernel\Kernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, false)
#21 {main}

Relevant log output

No response

Additional context

No response

pipo1000 commented 3 months ago

I get the same issue with the official Prestashop 8.1.5 Docker image.

Can you please give me a response to this issue, I have been waiting for an answer since March 22 ? Our migration to newer Prestashop versions is now fully blocked because of the lack of working PS 8 MyParcel plugin.

My first original issue was on; https://github.com/myparcelnl/prestashop/issues/226#issuecomment-2014886524

EdieLemoine commented 3 months ago

Duplicate of #248, I'll post a response there