Describe the bug
Infinite loop and order blocked with two specific cart rules.
To Reproduce
Steps to reproduce the behavior:
With a fresh Prestashop 1.7.6.1 installation in debug mode. Follow this exactly in this order :
If xdebug is enabled, You'll get the error "Maximum function nesting level of '256' reached, aborting!" If not, php will crash and you'll only have a 500 error.
This bug is not present in 1.6, It's a regression.
It seems that cart rules are recursively evaluated and product list is reconstructed each call of cart computation.
As already disscussed with @matks, this PR should fix the bug https://github.com/PrestaShop/PrestaShop/pull/12878
Screenshots
Additional information
PrestaShop version: 1.7.6.1
PHP version: 7.0
Hi @jf-viguier,
I manage to reproduce the issue with PS1.7.6.1 & develop branch & PS1.7.6.0.
In the BO => Orders => Shopping cart page => Error 500
https://drive.google.com/file/d/1NF_01f5wjBDMQ4ko4XHn1VWuETOHuovH/view
With PS1.7.5.2 => OK
https://drive.google.com/file/d/1UsFAYsqj_KjZz-TFA7z6_5xCaTy-jkRw/view
I’ll add this to the debug roadmap.
Thanks!
Thanks @khouloudbelguith
I can provide by email a real world dump with 300 cart rules for your future tests.
you are speaking about PR #12878, is this issue related to #11172
Unfortunately, after reviewing the PR, we have considered it does not fix the issue, so we put it back on the To do column and are going to work on it asap.
Unfortunately, after reviewing the PR, we have considered it does not fix the issue, so we put it back on the To do column and are going to work on it asap.
ok @colinegin and what's the plan to fix it ?
Unfortunately, after reviewing the PR, we have considered it does not fix the issue, so we put it back on the To do column and are going to work on it asap.
ok @colinegin and what's the plan to fix it ?
We go deeper in the code 😉
@PierreRambaud just assigned himself
Thanks @PierreRambaud : you've got all my support.
Hum, I tried many times with 1.7.5 and still have the problem. Seems not to be a regression.
We maybe found a fix with #15691 :crossed_fingers:
Hi all, have you validated the fix #15691 for this bug ?
@jf-viguier Still waiting for review and QA :/
ok thanks
Most helpful comment