2

Running into this problem in a form to create an activity with two existing contacts. The form creates the activity successfully, but the UX is marred by angry red error messages. I replicated the problem in a test form with nothing but one existing contact. This test form is accessible at http://cc.unidosnow.org/node/7?cid1=200. Submitting the test form results in similar error messages as seen with the full fledged form:

  • Notice: Undefined index: address in wf_crm_webform_postprocess->saveContactLocation() (line 751 of /home/unidosnow/www/www/sites/all/modules/webform_civicrm/includes/wf_crm_webform_postprocess.inc).
  • Notice: Undefined index: email in wf_crm_webform_postprocess->saveContactLocation() (line 752 of /home/unidosnow/www/www/sites/all/modules/webform_civicrm/includes/wf_crm_webform_postprocess.inc).

Seems to be wanting address and email (to enable contact creation?), but the only thing checked in the webform's CiviCRM tab is Existing Contact and that's all I need from the contacts in the full fledged form.

I am running CiviCRM 7.x-4.7.29, Drupal 7.58, Webform 7.x-4.16, Webform CiviCRM Integration 7.x-4.20, PHP 5.6.

Thoughts?

5
  • I am having exactly the same problem! I am using the webform to create a new case using an existing contact. All the values are stored correctly when submitted but I don't want to show the user the ugly message!
    – Ben
    Commented Apr 26, 2018 at 14:29
  • 1
    Ben's case - drupal.org/project/webform_civicrm/issues/2966760
    – wil_SRQ
    Commented May 15, 2018 at 11:23
  • Same message here on creation of new activity.
    – pmoz
    Commented May 15, 2018 at 21:03
  • I'm seeing a similar error with a form which is just a mailing group subscription form with a couple of additional custom fields - as a workaround I included an address field and changed that field to hidden - the php notice isn't triggered, and the form doesn't try to fill in the address.
    – liblogger
    Commented May 21, 2018 at 16:03
  • I also resorted to that workaround.
    – wil_SRQ
    Commented May 21, 2018 at 20:04

1 Answer 1

1

It looks like a fix for this issue has been committed to the webform_civicrm project and should be present in version 7.x-4.21+

Details are here: https://www.drupal.org/project/webform_civicrm/issues/2966760

The fix itself is here: https://github.com/colemanw/webform_civicrm/pull/139

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.