Commerce cron task fails after auction finishing

Created on 7 July 2020, over 4 years ago
Updated 26 November 2023, about 1 year ago

Once an auction has finished and cron runs you get the following error:

Error: Call to a member function id() on null in Drupal\commerce_cart\CartProvider->createCart() (line 82 of /app/web/modules/contrib/commerce/modules/cart/src/CartProvider.php)

This is the line causing the issue.
/app/web/modules/contrib/auctions/modules/auctions_commerce/src/Service/AuctionOrderItem.php(147): Drupal\commerce_cart\CartProvider->createCart('default', NULL, Object(Drupal\user\Entity\User))

As this is due to a default store not been created, we should handle this error better by displaying a message to the user to setup a store account and inform them that's why cron has failed.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom c_archer Cumbria

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.

Production build 0.71.5 2024