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.

Comments

jsacksick’s picture

Status: Active » Needs review
StatusFileSize
new716 bytes

Simple fix attached

jsacksick’s picture

In 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.

rszrama’s picture

Status: Needs review » Fixed

I 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

Status: Fixed » Closed (fixed)

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

bojanz’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new2.52 KB

That 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.

bojanz’s picture

StatusFileSize
new2.78 KB

Better patch.

rszrama’s picture

Status: Needs review » Fixed

Ahh, 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.

Status: Fixed » Closed (fixed)

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