Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2407319-1-fix-customer-attach-form.patch | 773 bytes | bojanz |
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedHere's the patch.
Comment #3
bojanz CreditAttribution: bojanz commentedCommitted.
Comment #5
bojanz CreditAttribution: bojanz commented