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 Profiles (Moderator: Dave Greenberg) »
  • CiviCRM profiles + Location module + Views
Pages: [1]

Author Topic: CiviCRM profiles + Location module + Views  (Read 2640 times)

alextronic

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 2
  • I do what I do
CiviCRM profiles + Location module + Views
August 24, 2009, 09:33:07 am
I'm using CiviCRM 2.2.0, and last versions of Views2 and Locations. I have enabled User Location too.

I read this: http://drupal.org/node/39641 and it made me very happy because that was just what I was needing; that is, to use CiviCRM's profiles billing address/location information in order to list users and their locations in Views. My site collects the user's location in the user's drupal page, via a CiviCRM profile.

So I started working. I created the CiviCRM profile, containing the following fields for users registration:
First Name
Last Name
City <---IMPORTANT
Street Address
State <---IMPORTANT
Country <---IMPORTANT
Postal Code   

NOTE1: these fields were set as 'Public User Pages and Listings'.
NOTE2: When creating CiviCRM's Profile fields, the options did not contain any field marked as Location-related, I simply used those from Contact's information...
NOTE3: I used "Billing" in the 3rd dropdown because I'm also using profiles to pre-populate contribution pages, so it would be a shame if I have to change that to Home or Primary since I don't want to bother the user with 2 or 3 address forms. Moreover, changing that option doesn't seem to fix anything.

So users start to register in drupal's user registration and to add their location information via that Civicrm Profile form. It all appears well when viewing/editing their corresponding drupal user's page afterwards.

Then I create a View to list Users; I select as fields the following information from Location Module: Location: City, Location: Province, Location: Country. I do this because I have CiviCRM integrated with Views, but in the available CiviCRM fields for Views I can't any CiviCRM Contacts: City or similar.

But when I use Views to display a user's Location fields (those marked as Important above), they appear empty in the finished View. It doesn't seem that the user's location fields have been populated with CiviCRM's Profile fields information. Maybe there is a SYNC process missing in between, I don't know.

I'm sorry if my english is not too good. I post this also in Location Module's project page because I can see it also belongs there as much as here.

Thanks in advance!
Alex.

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: CiviCRM profiles + Location module + Views
August 24, 2009, 09:45:59 am

can u upgrade to CiviCRM v2.2.8 I'm pretty sure this is fixed in a recent release

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

alextronic

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 2
  • I do what I do
Re: CiviCRM profiles + Location module + Views
August 24, 2009, 10:18:46 am
Quote from: Donald Lobo on August 24, 2009, 09:45:59 am
can u upgrade to CiviCRM v2.2.8 I'm pretty sure this is fixed in a recent release

I will do that and report.

alextronic

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 2
  • I do what I do
Re: CiviCRM profiles + Location module + Views
August 24, 2009, 01:23:47 pm
OK, I upgraded to CiviCRM 2.2.8 and the problem went away. Great.

Only the View has an unexpected behavior now, duplicating items and other differences from the previous results.

A.

CiviTeacher.com

  • I live on this forum
  • *****
  • Posts: 1282
  • Karma: 118
    • CiviTeacher
  • CiviCRM version: 3.4 - 4.5
  • CMS version: Drupal 6&7, Wordpress
  • MySQL version: 5.1 - 5.5
  • PHP version: 5.2 - 5.4
Re: CiviCRM profiles + Location module + Views
August 24, 2009, 06:40:08 pm
There is a bug in Views+CiviCRM integration.  I have run into this before.  CiviCRM is a little rough around the edges when it comes to Views integration.

What is happening is that contacts with multiple emails or multiple locations will show up as duplicates in the View

Annoying huh?  My guess is someone needs to refine the handlers in the Views+CiviCRM integration.  I've looked into it but don't know how myself, I was stumped.

Sorry dude, but at least you know what is going on now.

If you want to display CiviCRM data, why don't you create a public CiviCRM Profile?  Check this out, this is a CiviCRM profile.  No duplicates.  http://www.ftthcouncil.org/en/civicrm/profile/?gid=7&reset=1&force=1
Try CiviTeacher: the online video tutorial CiviCRM learning library.

alextronic

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 2
  • I do what I do
Re: CiviCRM profiles + Location module + Views
August 24, 2009, 07:18:55 pm
Yes, it is really annoying. Checking Distinct doesn't solve anything. Maybe there is a patch, a hack or a workaround for this.

Thanks for the link, but I think that my View cannot be attained that way; we're talking about Organic Groups here...

Another interesting side effect after upgrading to 2.2.8 is that adding the field User:Name breaks the layout of the View's table. .....Ouch!!!!

Why does it happen now? Thnx
« Last Edit: August 24, 2009, 07:21:19 pm by alextronic »

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: CiviCRM profiles + Location module + Views
August 24, 2009, 07:46:09 pm

With the views integration code your best bet would be to jump in there, understand it and improve it for the next generation of civicrm+views users :)

So far, we've had really good success of folks helping out and submitting patches to the code base. Hopefully the trend will continue

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

alextronic

  • I post occasionally
  • **
  • Posts: 57
  • Karma: 2
  • I do what I do
Re: CiviCRM profiles + Location module + Views
August 25, 2009, 11:34:27 am
Quote from: Donald Lobo on August 24, 2009, 07:46:09 pm
Hopefully the trend will continue

Of course!... Thanks anyway.

A.

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: CiviCRM profiles + Location module + Views
August 25, 2009, 12:37:20 pm
The duplicate problem can also occur if you are returning search for eg 'employee of' and have some records that have more than one such relationship.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • CiviCRM profiles + Location module + Views

This forum was archived on 2017-11-26.