Commerce calls field_attach_form() on a nested structure in only two places: commerce_cart_add_to_cart_form() and commerce_customer_field_widget_form().
Now, commerce_cart_add_to_cart_form() sets #parents as expected, but commerce_customer_field_widget_form() doesn't, which means that any commerce customer profile field widget (like the addressfield one) doesn't have accurate parents set, and is unable to access data in form state.

This breaks addressfield 7.x-1.0-rc1 on the order add/edit screen.

CommentFileSizeAuthor
#1 2407319-1-fix-customer-attach-form.patch773 bytesbojanz
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz’s picture

Status: Active » Needs review
FileSize
773 bytes

Here's the patch.

  • bojanz committed dcadb5b on 7.x-1.x
    Issue #2407319 by bojanz: commerce_customer_field_widget_form() must set...
bojanz’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Needs work

The last submitted patch, 1: 2407319-1-fix-customer-attach-form.patch, failed testing.

bojanz’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

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