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) »
  • CiviCRM Views: "CiviCRM Contacts: Drupal ID" fails for chained relationships
Pages: [1]

Author Topic: CiviCRM Views: "CiviCRM Contacts: Drupal ID" fails for chained relationships  (Read 1037 times)

rjlang

  • I post occasionally
  • **
  • Posts: 48
  • Karma: 1
  • CiviCRM version: 4.2.8
  • CMS version: Drupal 6
  • MySQL version: 5.0.77
  • PHP version: 5.3.19
CiviCRM Views: "CiviCRM Contacts: Drupal ID" fails for chained relationships
May 11, 2013, 05:25:53 pm
In CiviCRM View integration, there is a Views relationship, "CiviCRM Contacts: Drupal ID", that link the Drupal user table to the CiviCRM contact ID. This works properly if the base type of the View is "CiviCRM Contact", but it fails for chained relationships, such as: base type is "CiviCRM Recurring Contribution profile" (table civicrm_contribution_recur), plus a first relationship of "CiviCRM Recurring Contributions: Contact ID", plus a second relationship of "CiviCRM Contacts: Drupal ID" linked to the previous relationship. Setting up a View like this throws a "nonexistent column" db error, even without defining any fields based on the second relationship.

This is due to a bug in file civicrm_handler_relationship_contact2users.inc, function query(), in which the final call to add_relationship() was linking back to the wrong table for chained relationships. There was no ill effect if this relationship was the first link in the chain, which is why it wasn't immediately noticeable.

Issue filed: http://issues.civicrm.org/jira/browse/CRM-12593. The patch fixes the issue for both D6 and D7.

Robert

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • CiviCRM Views: "CiviCRM Contacts: Drupal ID" fails for chained relationships

This forum was archived on 2017-11-26.