When custom profile fields are added to the billing profile (i.e. a phone number) but not the shipping profile, at checkout commerce_shipping seems to attempt to copy all profile field information resulting in an undefined index PHP error:
Notice: Undefined index: field_phone in commerce_customer_profile_pane_checkout_form() (line 165 of /.../profiles/commerce_kickstart/modules/contrib/commerce/modules/customer/includes/commerce_customer.checkout_pane.inc).

In addition to checking if a particular pane field / offset is empty, it should also check if it is set at all in its corresponding shipping pane in the loop around line 165.

Comments

googletorp’s picture

Status: Active » Closed (cannot reproduce)

The code you linked to doesn't exist in dev but have instead been moved to Drupal Commerce (core).

okokokok’s picture

I just did drush dl commerce_shipping-7.x-2.x-dev

and I'm getting a very similar error. Even on the same line.

I (kinda) applied this patch and that seems to fix it:
http://drupal.org/files/commerce-undefined-index-1821110-4.patch

It seems significant for this bug to be triggered that my installation is NOT in English.

jnettik’s picture

Not sure where my post should go in regards to #1 but I'm using 2.0 and the patch in #2 worked for me.