I just tried the newly committed code at #968112: Allow addressfield to be optional and seem to be getting the following error when I view the field's edit settings page.

Notice: Undefined variable: instance in addressfield_format_address_hide_country() (line 23 of /Users/glenn/websites/7c9d097f-0bc1-457d-8314-1d9e37f102bf/profiles/cmf/modules/contrib/addressfield/plugins/format/address-hide-country.inc).

I have cleared my caches as well.

Hope that helps. Let me know if you need any more information.

Comments

bojanz’s picture

Status: Active » Fixed

Whoops, thanks for catching that, pushed a fix.

  • bojanz committed 38b15ac on 7.x-1.x
    Issue #2391989: Notice: Undefined variable: instance
    
gmclelland’s picture

Thanks, that fixed it.

Status: Fixed » Closed (fixed)

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

aaronbauman’s picture

Title: Notice: Undefined variable: instance » Notice: Undefined index: instance
Status: Closed (fixed) » Needs review
StatusFileSize
new806 bytes

Now i'm getting the notice: "Undefined index: instance in addressfield_format_address_hide_country"
Against latest dev.
Reopening because this is essentially the same issue.

This issue crops up when rendering addressfield tokens.

Here's my (truncated) stacktrace:

  1. addressfield_format_address_hide_country(Array, Array, Array) addressfield.module:155
  2. addressfield_generate(Array, Array, Array) addressfield.tokens.inc:140
  3. addressfield_tokens('address-field', Array, Array, Array)
  4. call_user_func_array('addressfield_tokens', Array) module.inc:934
  5. module_invoke_all('tokens', 'address-field', Array, Array, Array) token.inc:178
  6. token_generate('address-field', Array, Array, Array) addressfield.tokens.inc:227
  7. addressfield_tokens('entity', Array, Array, Array)
  8. call_user_func_array('addressfield_tokens', Array) module.inc:934
  9. module_invoke_all('tokens', 'entity', Array, Array, Array) token.inc:178
  10. token_generate('entity', Array, Array, Array) token.tokens.inc:810
  11. token_tokens('crm-core-contact', Array, Array, Array)
  12. call_user_func_array('token_tokens', Array) module.inc:934
  13. module_invoke_all('tokens', 'crm-core-contact', Array, Array, Array) token.inc:178
  14. token_generate('crm-core-contact', Array, Array, Array) entity_token.tokens.inc:208
  15. entity_token_tokens('user', Array, Array, Array)
  16. call_user_func_array('entity_token_tokens', Array) module.inc:934
  17. module_invoke_all('tokens', 'user', Array, Array, Array) token.inc:178
  18. token_generate('user', Array, Array, Array) token.inc:87
  19. token_replace('[user:field-primary-contact:field_cmcd_billing_addr:administrative-area]', Array, Array) salesforce_mapping.fieldmap_type.inc:472
bojanz’s picture

Status: Needs review » Closed (duplicate)