productcomments: Incorrect declaration of foreign keys in Doctrine ORM Entity annotations #35523
Open
2 tasks done
Labels
8.1.x
Branch
BO
Category: Back Office
Bug
Type: Bug
Module
Module
NMI
Status: issue needs more information
Productcomments
Module: productcomments
Waiting for dev
Status: action required, waiting for tech feedback
Prerequisites
Describe the bug and add attachments
After upgrading to PS 8.1.4 and productcomments 6.0.2, upgrade the database schema with doctrine.
In the BO, productcomments, it is no longer possible to delete a comment. Why?
Docrtine created incorrect foreign keys (run
php bin/console doctrine:schema:update --dump-sql
to see the script that is executed):The first three foreign keys should include
on delete cascade
to allow deletion of a comment (every comment has a related comment_grade, and if someone reported a spam comment, it will probably have a related comment_usefulness and / or comment_report).Expected behavior
Updating the database schema must not break a backend functionality. Here: it must not break the possibility to delete a comment in the BO
Steps to reproduce
If yes:
php bin/console doctrine:schema:update --dump-sql
PrestaShop version(s) where the bug happened
8.1.4
PHP version(s) where the bug happened
8.1.27 (not related to PHP)
If your bug is related to a module, specify its name and its version
productcomments 6.0.2
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: