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) »
  • Using Drupal contextual filters in a view with CiviCRM data
Pages: [1]

Author Topic: Using Drupal contextual filters in a view with CiviCRM data  (Read 2520 times)

dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
Using Drupal contextual filters in a view with CiviCRM data
August 22, 2013, 05:15:21 pm
I am trying to set up a Drupal 7 view of new members in civicrm using a contextual filter based on state and am having 2 different issues that I can't find the answers for.  I have a regular filter of member status in new/current and would like to output display name and city.  This will be a content pane to be added with other information to build a state page using the panels module.

1. The view works okay with no argument, but when I add a state as an argument in the view's preview I get nothing returned.  Suggestions on what might be wrong?  I use contextual filters on other views (with drupal data only) and they work fine.

2. For every field I add, I get additional duplicates of the information.  For instance, if I just output the name and city, 2 instances of each user shows, but when I add the state, 4 instances of each user shows.  Is there a way to not show duplicates?


dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
Re: Using Drupal contextual filters in a view with CiviCRM data
August 27, 2013, 09:03:31 am
Does silence mean these are known bugs?  If so, where can I look for work-arounds?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Using Drupal contextual filters in a view with CiviCRM data
August 27, 2013, 09:25:14 am

There is currently no official or unofficial maintainer of the drupal + views3 integration code base. Would be great if you are willing to look into it and potentially become a maintainer of that part of the code base

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
Re: Using Drupal contextual filters in a view with CiviCRM data
August 29, 2013, 10:29:14 am
Unfortunately I do not have the skill set to maintain this code base.  After a day of research/testing I can't come up with a solution for either issue.  Is there another way to add the newest members into a panel?  Is it possible to add a CiviCRM report to a Drupal panel?  Any other way???

dsdart

  • I post occasionally
  • **
  • Posts: 85
  • Karma: 3
  • CiviCRM version: 4.4
  • CMS version: Drupal 7.25
  • MySQL version: 5.1.41
  • PHP version: 5.3.1
Re: Using Drupal contextual filters in a view with CiviCRM data
August 29, 2013, 11:48:15 am
For anyone that stumbles upon this thread looking for answers, I figured out that in the advanced section of views, choose the distinct setting under Query settings to remove duplicates.

Regarding the state contextual filter, it is the state_province_id it is looking for, not the state name as the title would lead one to expect.  Not sure how to pass in the state id though, so help is still needed...
« Last Edit: August 29, 2013, 04:48:24 pm by dsdart »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Drupal Modules (Moderator: Donald Lobo) »
  • Using Drupal contextual filters in a view with CiviCRM data

This forum was archived on 2017-11-26.