- ๐ช๐ธSpain interdruper
This error is triggered because the code assumes that $order_item->getPurchasedEntity() will always return an entity, but this can return NULL:
/** * Gets the purchased entity. * * @return \Drupal\commerce\PurchasableEntityInterface|null * The purchased entity, or NULL. */ public function getPurchasedEntity();
This can easily happen in practice, when locked carts contains a product variation that have been deleted.
An simplier alternative patch to #1 is provided.
- Status changed to RTBC
over 1 year ago 7:53am 21 April 2023 - ๐ฎ๐ณIndia keshavv India
Reviewed the patch code and tested it locally. Looks like its working perfect. Moving to RTBC
- Status changed to Needs work
about 1 year ago 12:01pm 9 December 2023 - ๐ท๐บRussia vvs Russia
Patch #2 is worked against error, but now I have many cart forms on cart page: https://i.imgur.com/GsoBQDM.jpg
- ๐ฎ๐ณIndia chetan 11
chetan 11 โ made their first commit to this issueโs fork.
- Status changed to Needs review
about 1 year ago 12:44pm 11 December 2023 - ๐ฎ๐ณIndia chetan 11
Hi,
I have fixed the above error on "price difference formatter" module.
Please check the raised MR.
Thanks.