Currently, the customer profile checkout pane callback doesn't check if the associated customer profile reference field is attached to the order, and this can throws fatal errors.
This issue will only happen if you have multiple order types.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 1923326-followup-6.patch | 2.78 KB | bojanz |
| #5 | 1923326-followup.patch | 2.52 KB | bojanz |
| #1 | commerce_customer-check-customer-profile-reference-field-exists-1923326-1.patch | 716 bytes | jsacksick |
Comments
Comment #1
jsacksick commentedSimple fix attached
Comment #2
jsacksick commentedIn fact this issue raises multiple questions, do we need per-order-type checkout pane settings ? This will probably involve too many changes for the 1.x branch.
Comment #3
rszrama commentedI went for a simpler solution to just see if the field name isset() on the wrapper.
Commit: http://drupalcode.org/project/commerce.git/commitdiff/acf8e3f
Comment #5
bojanz commentedThat fix wasn't enough.
First of all, it doesn't abort the building of the form, it just makes it continue with an empty profile, which is wrong.
Second, we need the same check in validate and submit, otherwise that will fail too (I get a fatal error in the submit callback).
Fix copied from commerce_single_address.
Comment #6
bojanz commentedBetter patch.
Comment #7
rszrama commentedAhh, I see, your issues are particularly related to using alternate order types during checkout. Not a use case we typically have in mind, but I'll go make a note of supporting alternate checkout form configurations based on the order type in Commerce 2.x. Committed.