I'm getting this error on checkout page/pabe... It does not appear on the webform page by itself, only on the checkout pane:

Notice: Undefined property: stdClass::$is_draft in webform_client_form() (line 1781 of /home/robbie/www.yourcolony.com/html/sites/all/modules/webform/webform.module).

Any ideas? Many thanks!

CommentFileSizeAuthor
#5 undefined-is_draft.patch567 bytesdmargetts
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arski’s picture

Hey there,

The reason you're getting that is because you selected "Show "Save draft" button " in the webform's advanced settings..

Now my simple solution to this is to simply say "don't select that" :) I don't think the save draft should or will work during checkout, so.. is there really a use case where that is desired?

Cheers

robbiew’s picture

Arski, yep -- that did the trick. I had 'save draft' in there originally because it was a multi-page registration form before I added it as a single checkout pane... Thank you for your swift reply!

Robbie

arski’s picture

Status: Active » Closed (fixed)

Cool stuff.

I added a note on the project page that drafts and multi-page webforms aren't supported just in case.

Enjoy!

avantwaves’s picture

Issue summary: View changes

I'm having this exact same problem but my forms don't have the Save Draft checked.
Any thoughts?

dmargetts’s picture

FileSize
567 bytes

@avantwaves I had the same problem. I did some digging and it turns out that webform_client_form expects FALSE as the fourth parameter if there is no submission. However, _uc_webform_pane_get_data returns an empty stdClass as the submission if there is no submission. I just updated it to return false on no submission and the problem is fixed. Patch attached, I hope it works for you.

avantwaves’s picture

Thanks @dmargetss
My webform had some select options with multiple selection on (checkboxes), I changed that to Radio Buttons and the problem went away. I'm going to test your patch though

caspianroach’s picture

Status: Closed (fixed) » Reviewed & tested by the community

#5 got rid of the error message, everything continued working fine. I think this should be merged.