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 »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgraded 3.1.5 > 3.2.5, participant query count is broken.
Pages: [1]

Author Topic: Upgraded 3.1.5 > 3.2.5, participant query count is broken.  (Read 668 times)

mortona2k

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 3
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5.2
Upgraded 3.1.5 > 3.2.5, participant query count is broken.
November 01, 2012, 06:51:35 pm
When I run a find participants report it says there are 1610 results.  When I export the participants, there are 1589 rows.  Before upgrading, everything worked fine.  I turned on query logging and pulled out the 2 queries for count and results (attached).

I tried removing the distinct on contact_a.id, but still got 1589 results.  Can I just make the result count use the same query as the actual results?  Where is it getting the additional results from anyway?  Thanks for looking.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Upgraded 3.1.5 > 3.2.5, participant query count is broken.
November 05, 2012, 09:43:29 am
Could this be related to this post http://forum.civicrm.org/index.php?topic=24312.0 ?
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

mortona2k

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 3
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5.2
Re: Upgraded 3.1.5 > 3.2.5, participant query count is broken.
November 05, 2012, 10:15:23 am
The first part sounds the same:
Quote
CiviCRM 4.1 build 38954 and previous versions has a issue with incorrectly reporting participant count on the find participant page and the event dashboard.
But I don't think this has to do with the event being full.

I think my problem is related to the join on participant notes.  If I remove them from the query, the count matches the number exported.  It looks more like it is related to this one:  http://forum.civicrm.org/index.php?topic=19718.0

Also, the pager is created for the inflated count.  When I click on the last page, I get an error.

Thanks for looking, I really appreciate it.  I can debug further if you point me in the right direction.

mortona2k

  • I’m new here
  • *
  • Posts: 11
  • Karma: 0
  • CiviCRM version: 3
  • CMS version: Drupal
  • MySQL version: 5
  • PHP version: 5.2
Re: Upgraded 3.1.5 > 3.2.5, participant query count is broken.
November 09, 2012, 10:52:43 am
I fixed the query count by removing the join on civicrm_note:

sites/default/modules/civicrm/CRM/Contact/BAO/Query.php:2014

Code: [Select]
/*case 'civicrm_note':
$from .= " $side JOIN civicrm_note ON ( civicrm_note.entity_table = 'civicrm_contact' AND
                                                         contact_a.id = civicrm_note.entity_id ) ";
continue;*/

Can you please advise on any unintended consequences that may arise and if there is a better fix available?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Upgraded 3.1.5 > 3.2.5, participant query count is broken.

This forum was archived on 2017-11-26.