cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.2.8 bundle product special price crashes server

Magento 2.2.8 bundle product special price crashes server

Hi, guys

 

Has anyone encountered error with Magento 2.2.8 and bundle products.

 

My problem is when I add a special price to the product and I add it to the cart it generates a Fatal Error, something like:

PHP message: PHP Fatal error:  Allowed memory size of 792723456 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

PHP message: PHP Fatal error:  Allowed memory size of 792723456 bytes exhausted (tried to allocate 131072 bytes) in Unknown on line 0

PHP message: PHP Fatal error:  Allowed memory size of 792723456 bytes exhausted (tried to allocate 262144 bytes) in Unknown on line 0

7 REPLIES 7

Re: Magento 2.2.8 bundle product special price crashes server

Hello @mariusnegoescu 

 

You will require to increase memory limit from the php.ini file.

 

So kindly go to your php.ini file and put value of memory_limit as 16G - Here is the syntax "memory_limit = 16G

 

Hope it helps !

 

 

 

if issue solved,Click Kudos & Accept as Solution

Re: Magento 2.2.8 bundle product special price crashes server

Hello @mariusnegoescu 

 

is there custom module are you using for bundle customization?


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Magento 2.2.8 bundle product special price crashes server

No, i am using the default magento 2 functionality

Cheers, Marius

Re: Magento 2.2.8 bundle product special price crashes server

Hello @mariusnegoescu 

 

There is one bug recetly fixed

 

diff --git a/vendor/magento/module-catalog/Model/ResourceModel/Product/Indexer/Price/Query/BaseFinalPrice.php b/vendor/magento/module-catalog/Model/ResourceModel/Product/Indexer/Price/Query/BaseFinalPrice.php
index 438445e..9561ae7 100644
--- a/vendor/magento/module-catalog/Model/ResourceModel/Product/Indexer/Price/Query/BaseFinalPrice.php
+++ b/vendor/magento/module-catalog/Model/ResourceModel/Product/Indexer/Price/Query/BaseFinalPrice.php
@@ -190,7 +190,7 @@ class BaseFinalPrice
         $specialFromExpr = "{$specialFrom} IS NULL OR {$specialFromDate} <= {$currentDate}";
         $specialToExpr = "{$specialTo} IS NULL OR {$specialToDate} >= {$currentDate}";
         $specialPriceExpr = $connection->getCheckSql(
-            "{$specialPrice} IS NOT NULL AND {$specialFromExpr} AND {$specialToExpr}",
+            "{$specialPrice} IS NOT NULL AND ({$specialFromExpr}) AND ({$specialToExpr})",
             $specialPrice,
             $maxUnsignedBigint
         );

try to do that, save product again and check it.

if works then marks as solution.


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Magento 2.2.8 bundle product special price crashes server

I will try it as soon as i get back to work on Tuesday

Thabk you for your support

Re: Magento 2.2.8 bundle product special price crashes server

@Sunil Patel 

Hi, Sunil

 

I am afraid that did not work.

 

From my tests this only happens when Special Price is set, so it seems a bit odd Smiley Sad.

 

Cheers, Marius

Re: Magento 2.2.8 bundle product special price crashes server

Hi 

I have upgraded Magento 2.2.7 to Magento 2.2.8, after upgrade i am not able to add bundle product in cart. Once i clicked on add to cart button for bundle product then page get hang out. Please update me if there is any solution for this issue.