I have set up a webform that creates a new case based on an existing contact. Whenever I submit the form, I get the following error in Drupal:

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

The case is however, created fine in Civi.

This same error has been reported also in Stack Exchange: Webform with existing contact results in undefine index.

I am using Drupal 7.59, Civi 4.7.28, Webform 7.x-4.17.

Comments

bmango created an issue. See original summary.

colemanw’s picture

I'm getting that message too.

Notice: Undefined index: address in wf_crm_webform_postprocess->saveContactLocation() (line 751 of /home/colemanw/crm/build/d47/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/colemanw/crm/build/d47/sites/all/modules/webform_civicrm/includes/wf_crm_webform_postprocess.inc).

Looks like a recent change by KarinG. If the contact has no address or email it will give an undefined index warning.
But I'm also curious about that change - why address and email but not phone?

SRQ_civicrm’s picture

Same symptoms when creating a new activity for an existing contact, where only the name of the contact is needed.

colemanw’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.