-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicate product fails when using PDO and there are multiple rows for duplicated product in the product_group_reduction_cache #31737
Comments
Thank for your repor and for submitting this issue. Unfortunately, there is not enough information provided to reproduce it and work on it. You must follow the template and provide clear and concise steps to reproduce the bug. This issue is too technical for me. Thanks |
@AureRita, there's enough information, it's a valid bug report |
After updating 1.7.8.7 -> 1.7.8.8 I can't duplicate items.. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INSERT INTO ' . $sql . ''); 770. } 771. 772. throw new PrestaShopDatabaseException($this->getMsgError()); 773. } 774. } |
I have same problem, did you find any solution? |
|
I updated to 1.7.8.9, the problem still persists. But after making the change it works. config/defines.inc.php define('PS_ALLOW_MULTI_STATEMENTS_QUERIES', false); |
To temporarily fix it works, but this I think should not be a solution... PS: Thanks for your research ;) |
FIY: |
Prerequisites
Describe the bug and add attachments
GroupReduction::duplicateReduction
has a multistatement query that is blocked in config/defines.inc.php withdefine('_PS_ALLOW_MULTI_STATEMENTS_QUERIES_', false);
This prevents product duplication in
\PrestaShop\PrestaShop\Adapter\Product\AdminProductDataUpdater::duplicateProduct
function.This affects products that have multiple rows in product_group_reduction_cache and database setups using PDO
Expected behavior
No response
Steps to reproduce
There should be enough information in the description to verify and fix this bug.
PrestaShop version(s) where the bug happened
1.7.8.8
PHP version(s) where the bug happened
7.4.33
If your bug is related to a module, specify its name and its version
No response
The text was updated successfully, but these errors were encountered: