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 CiviReport (Moderator: Dave Greenberg) »
  • Activity Reports fails using ACLs
Pages: [1]

Author Topic: Activity Reports fails using ACLs  (Read 463 times)

francescbassas

  • I’m new here
  • *
  • Posts: 26
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.28
  • MySQL version: 5.3
  • PHP version: 5.1
Activity Reports fails using ACLs
May 26, 2014, 02:46:03 am
We note that when we launch an activity report with a user that uses ACLs rules, the activity report fails with no response.

If we look into the database we can found the query with the status "Copying to tmp table" and the query never ends. The problem appears in the function buildACLClause() in the /CRM/Report/Form/Activity.php file. The function adds to the final query three inner joins with a suspicious IS NULL comparation.

Then, the code added for the buildACLClause()

Code: [Select]
INNER JOIN civicrm_acl_contact_cache aclContactCache_0 ON ( civicrm_contact_source.id = aclContactCache_0.contact_id OR civicrm_contact_source.id IS NULL ) AND aclContactCache_0.user_id = 721
INNER JOIN civicrm_acl_contact_cache aclContactCache_1 ON ( contact_civireport.id = aclContactCache_1.contact_id OR contact_civireport.id IS NULL ) AND aclContactCache_1.user_id = 721
INNER JOIN civicrm_acl_contact_cache aclContactCache_2 ON ( civicrm_contact_assignee.id = aclContactCache_2.contact_id OR civicrm_contact_assignee.id IS NULL ) AND aclContactCache_2.user_id = 721

If we launch the query with only one of any of the three inner joins the query ends successfully. But when two or three of the inner joins are launched the query hangs. I think I lack knowledge of MySQL from there to see what is happening.

Someone can reproduce this issue? Someone with good skills of MySQL can check if this triple inner join query has any problem?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Activity Reports fails using ACLs
May 26, 2014, 02:05:08 pm
I have a feeling this might be fixed in 4.4 - rings a bell
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

francescbassas

  • I’m new here
  • *
  • Posts: 26
  • Karma: 2
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7.28
  • MySQL version: 5.3
  • PHP version: 5.1
Re: Activity Reports fails using ACLs
June 02, 2014, 12:55:02 am
Thanks Eileen! I upgraded from 4.3.4 to 4.4.5 and it works!

Anyway, I had to apply the following patch: https://github.com/civicrm/civicrm-core/pull/2530/files.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Activity Reports fails using ACLs
June 02, 2014, 06:57:37 pm
So that patch is not in 4.4?
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 CiviReport (Moderator: Dave Greenberg) »
  • Activity Reports fails using ACLs

This forum was archived on 2017-11-26.