After upgrading to 7.x-1.6 I now get three error messages in my logs:
Notice: Undefined index: submission in addressfield_tokens_token_info_alter()
Notice: Undefined index: values in addressfield_tokens_token_info_alter()
Notice: Undefined index: description in addressfield_tokens_token_info_alter()

Comments

Glottus created an issue. See original summary.

grahamshepherd’s picture

I started getting these three error messages on update to 7.x-1.6 as well. I have disabled the module for the time being.

brandonpost’s picture

It looks like in the addressfield_tokens_token_info_alter() function of 7.x-1.6 an assumption was made that the Webform module would be installed. Here is a patch that checks to see if Webform's 'submission' token is set and should resolve the issue.

Anonymous’s picture

Patch #3 solved this for me.
I do'nt have the webform module installed.

grahamshepherd’s picture

Likewise. Patch #3 worked for me as well. The site where I encountered this problem did not have webform installed. Other sites did and didn't show the error. So that seemed to do the trick.

Thanks for the quick response.

hass’s picture

Status: Active » Needs review

  • lambic committed e3aab89 on 7.x-1.x authored by brandonpost
    Issue #2902630 by brandonpost: Multiple "Undefined index" errors
    

lambic credited lambic.

lambic’s picture

committed to dev, thanks!

lambic’s picture

Status: Needs review » Reviewed & tested by the community
antiorario’s picture

Status: Reviewed & tested by the community » Fixed

Since the patch has been committed, this should be marked as Fixed.

hass’s picture

Any chance for a bugfix release?

Mike@TheWhippinpost’s picture

EDIT: Sorry, this issue pertains to a patch I applied from Address hidden with conditionals still required which adds the _webform_addressfield_validate() function causing the undefined issue below. Please delete if OT with my apologies.

I'm seeing:

Notice: Undefined index: curr_address in _webform_addressfield_validate() (line 244 of [...]\addressfield_tokens\addressfield_tokens.components.inc).

Additionally, I'm seeing:

Warning: Invalid argument supplied for foreach() in _webform_addressfield_validate() (line 244 of [...]\addressfield_tokens\addressfield_tokens.components.inc).

On 7.x-1.7

hass’s picture

Status: Fixed » Needs work
lambic’s picture

Why is this re-opened?

hass’s picture

Status: Needs work » Fixed

Comment #13 was edited and noted that this is a self-made issue.

hass’s picture

@lambic: When can you create a new official version?

lambic’s picture

I already did.

Status: Fixed » Closed (fixed)

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