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.
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!
Comment | File | Size | Author |
---|---|---|---|
#5 | undefined-is_draft.patch | 567 bytes | dmargetts |
Comments
Comment #1
arski CreditAttribution: arski commentedHey 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
Comment #2
robbiew CreditAttribution: robbiew commentedArski, 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
Comment #3
arski CreditAttribution: arski commentedCool stuff.
I added a note on the project page that drafts and multi-page webforms aren't supported just in case.
Enjoy!
Comment #4
avantwaves CreditAttribution: avantwaves as a volunteer commentedI'm having this exact same problem but my forms don't have the Save Draft checked.
Any thoughts?
Comment #5
dmargetts CreditAttribution: dmargetts commented@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.
Comment #6
avantwaves CreditAttribution: avantwaves as a volunteer commentedThanks @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
Comment #7
caspianroach CreditAttribution: caspianroach commented#5 got rid of the error message, everything continued working fine. I think this should be merged.