Support (offered by community volunteers) > Using Drupal Modules
Drupal7/Civi4 Views Error when calling Address: Country field
crispinbailey:
I am trying to build a simple member directory in Views3 and I am getting the following error message (twice as displayed):
--- Quote ---Notice: Undefined index: group_type in views_handler_field->query() (line 64 of /usr/www/users/.../.../sites/all/modules/views/handlers/views_handler_field.inc).
Notice: Undefined index: group_type in views_handler_field->query() (line 64 of /usr/www/users/.../.../sites/all/modules/views/handlers/views_handler_field.inc).
--- End quote ---
I get the error when I add the following field:
CiviCRM Address: Country
Any ideas as to why this field would cause the error, and why it would appear twice? Everything appears OK, and my views display properly, but the error message is a bit disconcerting.
Any insight much appreciated!
Cheers,
Crispin
crispinbailey:
Just to add to this, I have now updated to CiviCRM 4.0.5 and latest Drupal release (7.7) and I am now getting an additional error message displayed above my view (also appearing twice):
--- Quote ---Notice: Undefined index: location_op in civicrm_handler_field_address->ensure_my_table() (line 91 of /usr/www/users/.../.../sites/all/modules/civicrm/drupal/modules/views/civicrm/civicrm_handler_field_address.inc).
--- End quote ---
Strange... but at least I think I know why the error messages are displaying twice. What's happening is any contact records which have more than one address, and therefore 2 countries in their record, appear twice in the list. So that might explain why these error messages are also being displayed twice (once for each country).
ddunn:
Subscribing, I've got a similar problem.
jdaniluk:
I also see the error
--- Quote ---Notice: Undefined index: group_type in views_handler_field->query() (line 64 of /home/ntrlst2/public_html/modules/views/handlers/views_handler_field.inc).
--- End quote ---
I'm not displaying the country field in my view. I am displaying other parts of the address. The number of times the error message is displayed changes as I work with my view. Right now it is displayed 6 times. Sometimes more, sometimes less.
I'm using Drupal 7.7 and CiviCRM 4.0.4.
jdaniluk:
I discovered that the ugly pink display of these messages can be turned off from the Drupal Configuration > Development > Logging and Errors administration page. I set mine to display "errors and warnings" instead of "all messages". On a production site you might want to set it to display "none".
I guess since the message is headed "Notice" rather than Warning or Error, it's not critical. Just ugly.
Navigation
[0] Message Index
[#] Next page
Go to full version