Notice: Undefined index: field_name in addressfield_views_handler_filter_country->get_value_options() (line 8 of /var/www/sites/pg-d7.dev/www/sites/all/modules/contrib/addressfield/views/addressfield_views_handler_filter_country.inc).

Comments

dobrzyns created an issue. See original summary.

dobrzyns’s picture

Turns out the data structure changed, so the key was wrong. I've corrected the key used to get the field name.

dobrzyns’s picture

Status: Active » Needs review
dobrzyns’s picture

Helps if you commit the right key.

bojanz’s picture

When and where did the data structure change?
Commerce, Date, Entity API all use $this->definition['field_name'] in their handlers.

I've also been unable to reproduce this notice on a fresh install. A dsm of ($this->definition['field_name']) gives me the right data.

bojanz’s picture

Status: Needs review » Postponed (maintainer needs more info)
ron collins’s picture

We had this issue as well. It was caused by the exposed filter on a view. I found there were two available filters for country so I solved the problem by removing the "Field tables: Field address => Country" filter option and adding the "User: Address - Country" filter option.