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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • All search results not being displayed for simple search.
Pages: [1]

Author Topic: All search results not being displayed for simple search.  (Read 734 times)

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
All search results not being displayed for simple search.
March 08, 2011, 09:24:31 pm
Hi,

I have a 3.3.5 version of Civi and finding that at times when I do a search on name that while the civi reports that say 24 results are returned, only 7 are being displayed.  If I select the radio button for "All 24 Records" and press print, all 24 appear in the print page.  This happens also on advanced search but I can get the search builder to show the total number and they are all valid records in Civi (i.e. I can click on them to go to the record).  Is there any reason for this and how do I go about debugging it?

Thanks,
Anthony.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: All search results not being displayed for simple search.
March 08, 2011, 09:36:41 pm
The best way to debug it is probably to use devel module to show the queries that are being run & compare them
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: All search results not being displayed for simple search.
March 08, 2011, 09:54:53 pm
Oh, I assumed that devel wouldn't pick the queries as they didn't run through drupal's query abstraction.  That's a great idea, thanks for the tip Eileen.

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: All search results not being displayed for simple search.
March 08, 2011, 10:56:55 pm
Devel didn't pick up the queries, but using the values below documented at http://wiki.civicrm.org/confluence/display/CRMDOC33/Debugging gave me a similar result.

Code: [Select]
define( 'CIVICRM_DEBUG_LOG_QUERY', 1 );
define( 'CIVICRM_DEBUG_LOG_QUERY', 'backtrace' );
define('CIVICRM_DAO_DEBUG', 1);

What confuses me here is that the search results seem to be a big query that joins in phone and address information and is limited to returning 50 rows and then from that resultset the distinct contact ids are chosen.  This says to me that if a particular contact has more than 50 pieces of address and phone data and it's part of the first result set then some contact ids will always be excluded?  Shouldn't the limit be on the outermost query?  I'll try and prove this on demo (a bit slow trying to add 50 phone numbers to a contact :) ) and get back to post.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: All search results not being displayed for simple search.
March 08, 2011, 10:58:38 pm
Hi, That sounds likely - I have hit something like that before - in fact - somewhere not too high on my to-do list is a similar sounding problem with regards to participant count on the events dashboard (can't replicate on sandbox as there aren't enough events)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

malks

  • I post occasionally
  • **
  • Posts: 81
  • Karma: 7
  • CiviCRM version: 3.4.x 4.x
  • CMS version: Drupal 6.22
  • MySQL version: 5.1.x
  • PHP version: 5.3.x
Re: All search results not being displayed for simple search.
March 08, 2011, 11:15:32 pm
Worked out what the issue is here.  I had done some sql queries directly against the database and had marked all my addresses and emails against the contact as primary so the query was returning way more rows than it should have been.

Sorry about the noise.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: All search results not being displayed for simple search.
March 08, 2011, 11:17:24 pm
Hmm -  I thought one of the upgrades tidied that up

http://forum.civicrm.org/index.php/topic,11659.msg52898.html#msg52898
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • All search results not being displayed for simple search.

This forum was archived on 2017-11-26.