Closed (fixed)
Project:
Webform CiviCRM Integration
Version:
7.x-5.x-dev
Component:
Webform/Drupal
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Oct 2020 at 17:27 UTC
Updated:
10 Nov 2020 at 16:47 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
karingInteresting! Do you have specific steps to reproduce?
Comment #3
larynNo, but if I do I'll post back. My main concern was getting the form functional again but wanted to post this while in the middle of it in case others saw anything similar with recent versions of any of the modules.
Comment #4
karingOk I'll close w/ ("needs more info").
It sounds to me like a cache/clear confusion -> if it's not able to find
civicrm_api()Comment #5
jensschuppe commentedThis happens to us, too and is caused by the
hook_webform_submission_render_alter()implementation not checking whether!empty($node->webform_civicrm)as is done in submission insert and presave hooks.This is necessary because when using the "preview" feature, this hook is being invoked but CiviCRM integration code has not been included at that point.
I can't put up a patch right now, but this is Major, since the "preview" feature is unusable for webforms without CiviCRM integration enabled just by enabling this module.
Comment #6
jensschuppe commentedThe attached patch checks whether CiviCRM integration is enabled for the webform in
webform_civicrm_webform_submission_render_alter()before doing anything.Comment #8
colemanw commentedThank you @jensschuppe I've applied a version of your patch & will do a release since I agree this is a major bug.
Comment #9
karingThank you! @jensschuppe
For reference -> https://github.com/colemanw/webform_civicrm/commit/430cc172478a90b202700...
I don't think this requires a D8WFC port.
Comment #11
hansrossel commentedYou also get this error (also with the latest patch installed) when CiviCRM integration is turned on, but no civicrm fields are added to the form.
Comment #12
hansrossel commented