Notice: Undefined index: country in addressfield_format_address_hide_country() (line 21 of sites/all/modules/contrib/addressfield/plugins/format/address-hide-country.inc).
Files: 

Comments

Status:Active» Needs review
StatusFileSize
new963 bytes

Status:Needs review» Reviewed & tested by the community

In what scenario/configuration are you encountering this? I suppose someone could create a format plugin to unset the country #options, but they're just asking for trouble ;)

Nonetheless, I can't think of a good reason not to include this.

Can confirm that this patch resolves the error. Thank you mrfelton.

I'm seeing this issue when displaying a content type with an addressfield in views, using a views attachment, in HTML List style, displaying a custom display type created with Display Suite. The field's display options are set to "Hide the country when only one is available". In the edit form, the "Address form (country-specific)" setting is also checked.

Status:Reviewed & tested by the community» Fixed

Hah, I finally figured out how to reproduce the notice. These fields must have been configured to not show an address and hide the country. Since they aren't building the format for an address, though, there's no reason to select the box to hide the country. For the folks seeing this notice, you just have a weird configuration. : P

Still, since we don't have plugin dependencies, I'll go ahead and make it conditional.

Commit: http://drupalcode.org/project/addressfield.git/commitdiff/7a8e1a4

Status:Fixed» Closed (fixed)

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