I needed more advance billing information for orders just for one country, so i removed field "commerce_customer_address" from admin/commerce/customer-profiles/types/billing/fields and add custom fields what i needed, and all fine, but when i visited order edit page i got this message:
Notice: Undefined index: commerce_customer_address in function commerce_customer_field_widget_form() (line 907 in file sites/all/modules/commerce/modules/customer/commerce_customer.module).
Warning: Invalid argument supplied for foreach() in function element_children() (line 6134 in file includes/common.inc).
Comments
Comment #1
rszrama commentedAhh, interesting. The problem is that the form function expects to find the address field there for any customer profile type that specifies it in its type info array. In your case, you've deleted the default one, which we've left as a possibility, but we only check based on the default address field name and the data in the profile type's info array. What we should do instead is update lines 905-918 of that function to work for any address field in the type regardless of whether it's a default address field or not.
Comment #2
rszrama commentedAlrighty, I fixed the immediate issue, and I added an extra measure that leaves the fieldsets in place in the event that more than one address field is present on a profile type. I also spawned the following feature request: #1241566: Make removing the fieldset around address fields optional
Commit: http://drupalcode.org/project/commerce.git/commitdiff/10b5f52
Comment #3
vitok-dupe commentedThx.
Comment #4
vitok-dupe commentedups