CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Drupal7/Civi4 Views Error when calling Address: Country field
Pages: [1]

Author Topic: Drupal7/Civi4 Views Error when calling Address: Country field  (Read 1628 times)

crispinbailey

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 1
  • CiviCRM version: 4.0.5
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Drupal7/Civi4 Views Error when calling Address: Country field
July 13, 2011, 10:43:05 am
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).

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

  • I post occasionally
  • **
  • Posts: 30
  • Karma: 1
  • CiviCRM version: 4.0.5
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Drupal7/Civi4 Views Error when calling Address: Country field
August 04, 2011, 10:40:17 am
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).

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

  • I’m new here
  • *
  • Posts: 24
  • Karma: 0
  • CiviCRM version: 4
  • CMS version: Drupal
  • MySQL version: 5.0.7-dev
  • PHP version: 5.3.4
Re: Drupal7/Civi4 Views Error when calling Address: Country field
August 15, 2011, 02:56:54 pm
Subscribing, I've got a similar problem.

jdaniluk

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7.14
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Drupal7/Civi4 Views Error when calling Address: Country field
August 23, 2011, 11:54:01 am
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).

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’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.2.0
  • CMS version: Drupal 7.14
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Drupal7/Civi4 Views Error when calling Address: Country field
August 26, 2011, 12:41:28 pm
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.

joemaine

  • I post occasionally
  • **
  • Posts: 114
  • Karma: 3
  • CiviCRM version: 4.1
  • CMS version: Drupal 7.14
  • MySQL version: 5.1
  • PHP version: 5.2
Re: Drupal7/Civi4 Views Error when calling Address: Country field
June 25, 2012, 07:01:23 pm
There are a couple of related threads at:
http://drupal.org/node/1349546
and
http://drupal.org/node/1415584

While:
Notice: Undefined index: group_type in views_handler_field->query() (line 99 of C:\wamp\www\sites\all\modules\views\handlers\views_handler_field.inc).
shows multiple times on every view with CiviCRM fields...the following randomly appears (usually in a pair):
Notice: Undefined index: link_to_civicrm in civicrm_handler_field->options_form() (line 48 of C:\wamp\www\sites\all\modules\civicrm\drupal\modules\views\civicrm\civicrm_handler_field.inc).
--
Joe

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Drupal7/Civi4 Views Error when calling Address: Country field

This forum was archived on 2017-11-26.