0

I have this problem with the magento checkout, when placing an order the first try will return an error, but the second will work. the error is

A server error stopped your order from being placed. Please try to place your order again.

"trace":"#0 /home/uhdcusr/httpdocs/cr-store/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Checkout\Model\PaymentInformationManagement->savePaymentInformationAndPlaceOrder(147...

and also a critical log is thrown in exceptions.log

[2020-01-14 20:19:22] main.CRITICAL: DateTime::__construct(): Failed to parse time string (15/01/2020 00:00) at position 0 (1): Unexpected character {"exception":"[object] (Exception(code: 0): DateTime::__construct(): Failed to parse time string (15/01/2020 00:00) at position 0 (1): Unexpected character at /app/vendor/magento/framework/Stdlib/DateTime.php:58)"} []
[2020-01-14 20:20:53] main.CRITICAL: Aucune entité avec customerId = 120 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): Aucune entité avec customerId = 120 at /app/vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []

the exception is thrown in PaymentInformationManagement in savePaymentInformationAndPlaceOrder

 $this->savePaymentInformation($cartId, $paymentMethod, $billingAddress);
    try {
        $orderId = $this->cartManagement->placeOrder($cartId);
    } catch (\Magento\Framework\Exception\LocalizedException $e) {
        throw new CouldNotSaveException(
            __($e->getMessage()),
            $e
        );
    } catch (\Exception $e) {
        $this->getLogger()->critical($e);
        throw new CouldNotSaveException(
            __('A server error stopped your order from being placed. Please try to place your order again.'),
            $e
        );
    } 

and the critical log is in model/Session at getQuote

i found an issue on github https://github.com/magento/magento2/issues/23411 but they only talked about the critical log not the checkout error. any ideas or help will be really appreciated. thanks

0

Kames, you Can find the solution at

https://github.com/magento/magento2/pull/25307/files

Or you can try below solution

https://github.com/magento/magento2/issues/23411#issuecomment-516611919

You have to apply the changes to respective files.

| improve this answer | |
  • thanx for your answer but these solutions address the critical log issue not the checkout error issue. if you're sure that it can fix the server error issue tell me how to apply this fix without changing the magento core files.thanx again. – Kames Guen Jan 15 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.