BEE + Commerce + Edit Node field breaks order

Created on 5 January 2021, over 4 years ago
Updated 23 October 2023, almost 2 years ago

Problem/Motivation

When your node field in order item is empty, "Place order" produces:

The website encountered an unexpected error. Please try again later.
Error: Call to a member function bundle() on null in Drupal\bee\EventSubscriber\OrderEventSubscriber->finalizeCart() (line 86 of modules/contrib/bee/src/EventSubscriber/OrderEventSubscriber.php).

Steps to reproduce

. BEE + Commerce running
. edit order from /admin/commerce/orders/carts
. edit item
. set "Node" field to null
. update order item
. save
. click on "Place order"
. BUUUM! you have error above exposed.

Proposed resolution

At minimum, be sure "node" field for BEE order is always "disabled"

🐛 Bug report
Status

Closed: cannot reproduce

Version

1.0

Component

Code

Created by

🇮🇹Italy afagioli Rome

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