Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-1535

CiviCRM ACL breaks counting smartgroups as anonymous Drupal user

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6
    • Component/s: Core CiviCRM
    • Labels:
      None

      Description

      I can't count the members of a smartgroup as an anonymous user. I've tried to assign "view" privilege and assigned it to all users, but it still can't count the group. The code snipet here, no longer works with CiviCRM 1.6:

      http://wiki.civicrm.org/confluence/display/CRM/Using+CiviCRM+APIs+-+Code+Snippets#UsingCiviCRMAPIs-CodeSnippets-Displaythenumberofusersinagroup%2Cincludingsmartgroups

      My code can be found in the Drupal CVS repositories:

      http://cvs.drupal.org/viewcvs/drupal/contributions/modules/civicrm_countblock/civicrm_countblock.module?rev=1.3&view=markup

      You can see a test scenerio at: http://drupal5.douggreenconsulting.com. The last block at the bottom of the page is a smartgroup that was generated from the "Active Users" group and should have 1 member in it. When I'm logged in, it displays 2, and when I'm not logged in, it displays 0.

      You can also read the Drupal bug thread here: http://drupal.org/node/107082

      I'm not sure that this is related, but I also get the following errors:

      Warning: Invalid argument supplied for foreach() in /.../modules/civicrm/CRM/Core/BAO/Mapping.php on line 587
      Warning: Invalid argument supplied for foreach() in /.../civicrm/CRM/Core/BAO/Mapping.php on line 663

      Thanks!

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              douggreen Doug Green
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: