When i Submitted the form, this error code appeared. And i use dsm to try to find the problem, i find that there will be an empty product be submitted with others when the products is submitted.
This could be the problem, and i hope someone can give me some suggestions to solve this problem.
Thank you!

Comments

jerenus’s picture

Category: bug » feature
Status: Active » Needs review
StatusFileSize
new1.86 KB

I just added a filter to solve the problem of non-object error.

jerenus’s picture

Category: feature » bug
micnap’s picture

The patch in #1 didn't do it for me. My issue was in commerce_webform.module. Here's a patch for that. Thanks jerenus for putting me on the right track.

Mickey

micnap’s picture

Just came across the place where the patch from #1 is needed - when viewing the associated webform submission from an order. Thanks for that!

So, it looks like both patches in this thread are needed.

Mickey

johnennew’s picture

I am not sure I understand the situation where the product_id may not be set. I have tested and seen that if you fail to choose any products for a productfield, the product_id is set as empty, though still there. This didn't appear to generate any errors though.

I have added the check for a non-empty product id, I think that !empty is a better test for this?

Kind regards,

John

jerenus’s picture

Thanks!

Jerenus

johnennew’s picture

Status: Needs review » Closed (fixed)

Committed this to dev. Thanks all.