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) »
  • Profile lists contact multiple times
Pages: [1]

Author Topic: Profile lists contact multiple times  (Read 1756 times)

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Profile lists contact multiple times
August 18, 2009, 10:04:08 pm
I have created a profile based on a smart group.  The profile lists a single contact more that once, usually two or three times, sometimes only once.

The smart group searches correctly, listing a contact only once.  So it must be something in the profile.  is there a setting on a field that would make it list an individual more than one time if certain data was present?

Thanks,
Maria

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: Profile lists contact multiple times
August 18, 2009, 10:56:54 pm
functionality seems to be working fine for my local install.

can u update your forum profile w/ CMS, CiviCRM, PHP and Mysql versions.

also you might want to replicate issue on public demo :  http://demo.civicrm.org/

thanks

kiran
You Are Designed To Choose... Defined By Choice.

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Profile lists contact multiple times
August 19, 2009, 04:33:20 pm
Updated most of the profile info, waiting on the php version, but it is pretty new.

I ran a test in the demo site, works just fine.  I am familiar with Views in Drupal which can output the same record more than once if the record has more than one tag that the view is calling.  But I don't know why that would be a problem with Civi. 

Can I give you anymore information?  Most of the searchable fields are standard (non-custom) fields. 

Thanks,
Maria

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Profile lists contact multiple times
August 19, 2009, 05:57:31 pm

I set up a demo on demo.civicrm.org, and if you sort "Adams" it pulls Dr. Purvi Adams, who has more than one phone field in his record.

So, this is specific to my site and my phone fields.  Any idea what the issue is?

Thanks,
Maria

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: Profile lists contact multiple times
August 19, 2009, 06:11:39 pm

can u check your db and ensure that there is only one is_primary / contact_id. you can try running a query similar to:

SELECT count(id) as cnt FROM civicrm_phone WHERE is_primary = 1  GROUP BY contact_id HAVING cnt > 1ORDER BY cnt SELECT count(id) as cnt FROM civicrm_phone WHERE is_primary = 1  GROUP BY contact_id ORDER BY cnt;

u should not get any contact_id with 2 is_primary. If so, you might want to fix them manually in the DB

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

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Profile lists contact multiple times
August 20, 2009, 01:53:51 pm
I am not a database person.  I ran the query, had an error, don't know how to fix it.  Sorry.  I am asking elsewhere as well, but if you have time to fix the query, I will run it.

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: Profile lists contact multiple times
August 20, 2009, 04:40:55 pm

argh, i messed up the cut-n-paste. here's another try:

Code: [Select]
  SELECT count(id) as cnt FROM civicrm_phone WHERE is_primary = 1 GROUP BY contact_id ORDER BY cnt;

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

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Profile lists contact multiple times
August 20, 2009, 04:43:52 pm
I ran the query.  I received 1906 Records (we have more contacts than that) and the "cnt" was 1, 2, 3 or 4.  Not sure how many to each number, but a lot for each.

No idea how to interpret the data b/c I am not quite sure what I am asking.  But there it is.

update: to be more clear, the query returns on column of 1906 records, with the numbers 1, 2, 3 or 4 in the column.  No reference to what record it is referring to, just a single column.
« Last Edit: August 20, 2009, 04:45:47 pm by mariagwyn »

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: Profile lists contact multiple times
August 20, 2009, 05:20:16 pm

so basically it means you have contact ids  with multiple primary phone numbers (and potentially email / address)

my sql knowledge is not good enough to give u a query to fix this, hopefully someone else will step in and help out :)


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

mariagwyn

  • I post frequently
  • ***
  • Posts: 149
  • Karma: 4
  • CiviCRM version: CiviCRM 3.3.3
  • CMS version: Drupal 6.20
  • MySQL version: 5.2.14
  • PHP version: 5.0.91-50-log
Re: Profile lists contact multiple times
August 20, 2009, 07:02:11 pm
Thanks, someone is working on this, though any suggestions are appreciated.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Profile lists contact multiple times

This forum was archived on 2017-11-26.