Jump to content

Order validation stopped working


Recommended Posts

My shop (Prestashop 1.7.8.7) is not finalizing orders any more for about 48 hours now. Clicking on 'order' causes a timeout. Payment modules are updated, payment works.

On the weekend I checked an extension called 'Merge Orders' to merge two orders into one. I have customers making 3-4 orders sometimes - so merging would help. However, right after installing this tool I realized that the shop does not finalizie orders any more. Clicking on 'order' ends in request timeout. As the paypal payment still works and the payment is done before, I receive these orders including list of articles, together with their paypal payment on paypal. But customers get a blank page in the end and their orders are not registered in Prestashop.

Since then I try to make the whole thing work again and I try to add the paypal orders in prestashop through the admin backend. But even in the backend the orders are not going through. I prolonged and even switched off timeout but it does not help. The process stucks. PHP Version is 7.3, by the way.

I reckon that merging these two orders caused an error in the database.
And if yes, how can I straighten this out?

Last entries in Error_log this morning:

[14-Feb-2023 03:13:57 Europe/Berlin] PHP Parse error:  syntax error, unexpected ':' in /home/lichterh/public_html/prestashop/modules/creativeelements/includes/widgets/shopping-cart.php on line 1440
[14-Feb-2023 03:14:23 Europe/Berlin] PHP Parse error:  syntax error, unexpected ':' in /home/lichterh/public_html/prestashop/modules/creativeelements/includes/widgets/shopping-cart.php on line 1440
[14-Feb-2023 06:08:22 Europe/Berlin] PHP Notice:  Undefined variable: category in /home/lichterh/public_html/prestashop/controllers/front/listing/CategoryController.php on line 250
[14-Feb-2023 06:08:22 Europe/Berlin] PHP Notice:  Trying to get property 'active' of non-object in /home/lichterh/public_html/prestashop/controllers/front/listing/CategoryController.php on line 250
[14-Feb-2023 06:52:25 Europe/Berlin] PHP Notice:  Undefined variable: category in /home/lichterh/public_html/prestashop/controllers/front/listing/CategoryController.php on line 250
[14-Feb-2023 06:52:25 Europe/Berlin] PHP Notice:  Trying to get property 'active' of non-object in /home/lichterh/public_html/prestashop/controllers/front/listing/CategoryController.php on line 250
[14-Feb-2023 07:05:57 Europe/Berlin] PHP Notice:  Undefined variable: category in /home/lichterh/public_html/prestashop/controllers/front/listing/CategoryController.php on line 250
[14-Feb-2023 07:05:57 Europe/Berlin] PHP Notice:  Trying to get property 'active' of non-object in /home/lichterh/public_html/prestashop/controllers/front/listing/CategoryController.php on line 250
[14-Feb-2023 07:07:32 Europe/Berlin] PHP Fatal error:  Uncaught Symfony\Component\Filesystem\Exception\IOException: Cannot rename "/home/lichterh/public_html/prestashop/var/cache/prod/translations/catalogue.de-DE.NXhscRe.phpua5Wcj" to "/home/lichterh/public_html/prestashop/var/cache/prod/translations/catalogue.de-DE.NXhscRe.php". in /home/lichterh/public_html/prestashop/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php:289
Stack trace:
#0 /home/lichterh/public_html/prestashop/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php(693): Symfony\Component\Filesystem\Filesystem->rename('/home/lichterh/...', '/home/lichterh/...', true)
#1 /home/lichterh/public_html/prestashop/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php(124): Symfony\Component\Filesystem\Filesystem->dumpFile('/home/lichterh/...', '<?php\n\nuse Symf...')
#2 /home/lichterh/public_html/prestashop/vendor/symfony/symfony/src/Symfony/Component/Translation/Translator.php(334): Symfony\Component\Config\ResourceCheckerConfigCache->writ in /home/lichterh/public_html/prestashop/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php on line 289
[14-Feb-2023 07:09:50 Europe/Berlin] PHP Deprecated:  Non-static method Promokit\Module\Pkfavorites\Main\FavoriteProduct::getProductsForTemplate() should not be called statically in /home/lichterh/public_html/prestashop/modules/pkamp/controllers/front/favoritesAccount.php on line 54
[14-Feb-2023 07:10:25 Europe/Berlin] PHP Fatal error:  Uncaught Symfony\Component\Filesystem\Exception\IOException: Cannot rename "/home/lichterh/public_html/prestashop/var/cache/prod/translations/catalogue.de-DE.NXhscRe.php.metaxVkRgK" to "/home/lichterh/public_html/prestashop/var/cache/prod/translations/catalogue.de-DE.NXhscRe.php.meta". in /home/lichterh/public_html/prestashop/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php:289
Stack trace:
#0 /home/lichterh/public_html/prestashop/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php(693): Symfony\Component\Filesystem\Filesystem->rename('/home/lichterh/...', '/home/lichterh/...', true)
#1 /home/lichterh/public_html/prestashop/vendor/symfony/symfony/src/Symfony/Component/Config/ResourceCheckerConfigCache.php(132): Symfony\Component\Filesystem\Filesystem->dumpFile('/home/lichterh/...', 'a:0:{}')
#2 /home/lichterh/public_html/prestashop/vendor/symfony/symfony/src/Symfony/Component/Translation/Translator.php(334): Symfony\Component\Config\ResourceCheckerConfigCache->write('< in /home/lichterh/public_html/prestashop/vendor/symfony/symfony/src/Symfony/Component/Filesystem/Filesystem.php on line 289
[14-Feb-2023 09:15:10 Europe/Berlin] PHP Warning:  Invalid argument supplied for foreach() in /home/lichterh/public_html/prestashop/modules/pscartabandonmentpro/classes/CartReminderCustomerInfo.php on line 136
 

That's the entries of the error log of the last 5 hours. Line 1440 in shopping-cart.php looks like this:

$cover = isset($product['default_image']) ? $product['default_image'] : $product['cover'] ?: Helper::getNoImage();

Unecpected ':'? Which one? 

I know that the order which was merged was number 100010724 - it was merged into 100010716. I see in phpmyadmin that the line of 100010724 is missing in ps_orders. Shall I manually bring it back through phpmyadmin or check/adjust any relations?

Would very much appreciate your help. If you are a prestashop developer familiar with these problems and have time to sort this out with me, I am happy to pay you, just pm me. 
 

 

 

Link to comment
Share on other sites

Dnia 14.02.2023 o 12:11 PM, Musterheld napisał:
$cover = isset($product['default_image']) ? $product['default_image'] : $product['cover'] ?: Helper::getNoImage();

 

It's one line if statement and the ':' is else. But as you can see it's used twice and before second there is question mark which indicates another if. I think this is the one messing up order validation. Try to change it to normal if elseif and see if it works. Then you can change it back to oneliner.
 

if(isset($product['default_image']))
{
	$cover = $product['default_image'];
}elseif(isset($product['cover'])){
	$cover = $product['cover'];
}else{
	$cover = Helper::getNoImage();
}

 

Edited by WisQQ (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...