i have disabled billing information for role with the help of Customer Profile Type UI.
but now, on checkout
Notice: Undefined index: commerce_customer_address in commerce_customer_field_widget_form() (line 954 of /home/u4586/domains/makey.u4586.argon.vps-private.net/sites/all/modules/commerce/modules/customer/commerce_customer.module). Backtrace:
commerce_customer_field_widget_form(Array, Array, Array, Array, 'und', Array, 0, Array) field.form.inc:78
field_default_form('commerce_order', Object, Array, Array, 'und', Array, Array, Array) field.attach.inc:209
_field_invoke('form', 'commerce_order', Object, Array, Array, Array) field.attach.inc:386
_field_invoke_default('form', 'commerce_order', Object, Array, Array, Array) field.attach.inc:568
field_attach_form('commerce_order', Object, Array, Array, NULL) commerce_fieldgroup_panes.module:59
commerce_fieldgroup_panes_contents_checkout_form(Array, Array, Array, Object) commerce_checkout.pages.inc:104
commerce_checkout_form(Array, Array, Object, Array)
call_user_func_array('commerce_checkout_form', Array) form.inc:787
drupal_retrieve_form('commerce_checkout_form_checkout', Array) form.inc:331
drupal_build_form('commerce_checkout_form_checkout', Array) form.inc:123
drupal_get_form('commerce_checkout_form_checkout', Object, Array) commerce_checkout.pages.inc:58
commerce_checkout_router(Object)
call_user_func_array('commerce_checkout_router', Array) menu.inc:517
menu_execute_active_handler() index.php:21
Comments
Comment #1
rszrama commentedI'm not sure how you're saying you've disabled the billing information, but if you've removed the customer profile reference field from the order or something, you'd also need to disable the checkout pane from the checkout form. You'll find this in your checkout form builder settings. If this fixes it, great, otherwise we'll need more information on what you've done to determine if there's actually a bug in play here or not.
Comment #2
dgastudio commentedok, thanks. i'll try it
Comment #3
dgastudio commentedno, sorry.
i'm using http://drupal.org/sandbox/jpayne/1358462 to dynamically disable profile panes using rules.
so, for user role "partner" i want to hide billing information, but for other users show it.
Comment #4
rszrama commentedAhh, well, in that case you should post an issue to that issue queue. : )
Comment #5
dgastudio commentedsolved by removing line 954 of commerce_customer.module.
Comment #6
rszrama commentedSounds risky to me. : )
I'd still post a bug report to that sandbox module's issue queue, as you shouldn't have to remove that line.
Comment #7
dgastudio commentedok, changing.
Comment #8
acrazyanimal commentedI see, can you explain in detail what you've done to disable the billing pane? Also, the page(s) where the error occurs?
I see similar errors, but never on checkout. I have been ingnoring them for now, but will have to deal with it soon enough. I have been waiting for more info on a process for deleting customer profile types before I moved this module forward any further. See #1330882: EntityMalformedException : Missing bundle property on entity - after uninstalling modules providing reference fields. Looks like I'll have to invent something.
Anyway, send me some additional info regarding what you're seeing and I'll see if I can help you out.
Comment #9
acrazyanimal commentedLooks like the issue is infact in the commerce_customer module. The line mentioned above in the error report (line 954 of commerce_customer.module) assumes that all addressfields associated with any profile type should be present on all profile types; it obviously is not. So I've just added a check that the field name is present in the array before trying to access it.
peace!
Comment #10
davidwhthomas commentedHere's a similar patch for this same issue.
In my case, I have several commerce customer profile types.
Some of them don't have address fields.
The current code assumes all profiles have an address field, which results in a notice error in the watchdog for each profile on each order.
The patch checks first to ensure the profile has an addressfield prior to processing.
Please commit when possible,
thanks.
DT
Comment #11
acrazyanimal commentedlol, ok I don't know why you would submit an identical patch, but yes please somebody commit either one of these patches to fix this issue.
cheers.
Comment #12
amateescu commentedLooks good to me (either patch) :)
Comment #13
rszrama commentedheh, nice confluence of patches. Went with the first since they're the same, but I did change it to an empty() check on the actual #language property to prevent an edge case of the array having the field array but missing a #language key.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/8f9a944