After deleting a field under Store » Configuration » Order settings » Manage fields, got the following:

Fatal error: Call to undefined function commerce_checkout_pane_load() in /commerce/modules/customer/commerce_customer.module on line 462

Another checkout module function call exists a few lines further on down. Should there be a module_exists() condition for these or assumption that checkout module should be enabled?

Comments

rszrama’s picture

Title: Fatal error on field delete due to module dependency » Customer module depends on Checkout when deleting a customer profile reference field
Component: User experience » Customer
Priority: Minor » Normal
Status: Needs review » Fixed

I actually found two additional problems while fixing this:

  1. If a checkout pane was locked to the disabled position (for example, a customer profile checkout pane whose related reference field has been deleted) and you try to reactivate it, you get an undefined index warning because there is no "disabled" checkout page. Fixed that with a quick alternate message.
  2. We were using hook_field_delete_field() without checking what the particular instance deleted was attached to, so a customer profile reference field instance deleted from a user profile bundle would've triggered the checkout pane update incorrectly. I've changed this to hook_field_delete_instance() and am now checking the entity / bundle type to only change the settings for profile reference fields attached to the default commerce_order bundle of the commerce_order entity type.

Commit: http://drupalcode.org/project/commerce.git/commitdiff/deac205

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.