apigee / apigee-m10n-drupal

Add monetization features to a Drupal developer portal
https://www.drupal.org/project/apigee_m10n
GNU General Public License v2.0
13 stars 13 forks source link

Error: Call to a member function resolve() on null in AddtoCartForm #474

Closed kedarkhaire closed 4 months ago

kedarkhaire commented 4 months ago

Description

Commerce module 2 latest releases (2.37 & 2.38) making issues on test cases as well as on the Add credit functionality.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to My Accounts > Balance & plans > Prepaid Plans
  2. Click on Add Credit present in Prepaid balance section for the currencies, which opens a modal and hit on checkout

Actual Behavior

WSOD is seen with this error in Logs Error: Call to a member function resolve() on null in Drupal\commerce_cart\Form\AddToCartForm->prepareOrderItem() (line 252 of /Users/kedark/Sites/localhost/null_compatibility/web/modules/contrib/commerce/modules/cart/src/Form/AddToCartForm.php).

Expected Behavior

Checkout page must be seen with the billing details with no errors.

Version Info

Issue occurs with commerce module with version 2.37 & 2.38. Works fine with older (2.36 & lower) versions of commerce module.

kedarkhaire commented 4 months ago

Closing with PR #475