Doctrine ORM annotations in psdgpr are not compatible with multishop activated #35521
Open
2 tasks done
Labels
Blocked
Status: The issue is blocked by another task
Bug
Type: Bug
GDPR
Module: psgdpr
Module
Module
Multistore
Label: Which BO under menu is concerned
Prerequisites
Describe the bug and add attachments
When updating the database scema to the latest installed version,
php bin/console doctrine:schema:update --dump-sql
showed these lines related to the psgdpr module:The last line is incorrect. The table
ps_psgdpr_consent_lang
contains a columnid_shop
that must be part of the primary key. The SQL command will fail, with an errorduplicate key
, because there is a line for each shop in the table.Expected behavior
php bin/console doctrine:schema:update --dump-sql
should produce valid output. This means, it must beALTER TABLE ps_psgdpr_consent_lang ADD PRIMARY KEY (id_gdpr_consent, id_lang, id_shop);
instead ofALTER TABLE ps_psgdpr_consent_lang ADD PRIMARY KEY (id_gdpr_consent, id_lang);
Steps to reproduce
PREFIX_psgdpr_consent_lang
, it has a primary key (id_gdpr_consent, id_lang, id_shop). You can also look at the filemodules/psgdpr/sql/install/psgdpr_consent_lang.sql
both for psgdpr 1.4.3 and psgdpr 2.0.1 and find this same definitionphp bin/console doctrine:schema:update --dump-sql
and observe the output. It will contain a primary key (id_gdpr_consent, id_lang) with id_shop absent.PrestaShop version(s) where the bug happened
8.1.4
PHP version(s) where the bug happened
8.0 / 8.1
If your bug is related to a module, specify its name and its version
psgdpr 2.0.1
Your company or customer's name goes here (if applicable).
Société Biblique de Genève
The text was updated successfully, but these errors were encountered: