Product Page View Error

Created on 31 March 2021, over 3 years ago
Updated 30 June 2023, over 1 year ago

When I am viewing the product page showing below error in commerce site.

The website encountered an unexpected error. Please try again later.
Error: Call to a member function getTimezone() on null in Drupal\commerce_order\Entity\Order->getCalculationDate() (line 624 of modules\contrib\commerce\modules\order\src\Entity\Order.php).

๐Ÿ’ฌ Support request
Status

Fixed

Version

2.4

Component

Order

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Ravi Sharma

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance berramou

    I have the same error but it comes from cart, when i try to access to carts i get the error, or when i place cart block in the header i get that error in all pages.
    Any idea what would be the issue ?

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany dev.tim

    dev.tim โ†’ made their first commit to this issueโ€™s fork.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany dev.tim

    according to Line 669 of modules/contrib/commerce/modules/order/src/Entity/Order.php there is probably missing a Store to that order. Maybe you have delete the store in the past, but order or cart was created when store was still exisiting?

    Line 669 of modules/contrib/commerce/modules/order/src/Entity/Order.php:

        $timezone = $this->getStore()->getTimezone();
    
  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom BWilliams1992

    Just had a similar issue myself, I think it turned out that a store was deleted with a half completed order in the database that still referenced the deleted store, deleted all order entities and it seems to have solved the issue.

Production build 0.71.5 2024