Closed (fixed)
Project:
CiviCRM Count Block
Version:
4.7.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
5 Jan 2007 at 14:08 UTC
Updated:
23 Jan 2007 at 12:24 UTC
I installed this module on our site and it works fine for admin users, but not for anonymous or other users without admin rights. The can see the block, but all counters are 0.
This is probably some setting in the acces control, but I can't figure out which one it is. Have been experimenting with the CiviCRM access right, but without unsuccessfull. As far as I can see, this is not documented anywere.
Can you please give me a point me in the right direction for this one?
Thanks.
Luc
(Tested on Drupal 4.7.5, CiviCRM 1.6)
Comments
Comment #1
GregoryHeller commentedYou must grant all users, including anon users the "view contacts in [your group]" permissions in "admin/access" in order for users to see the count of contacts in [your group].
Comment #2
stroobl commentedThat's strange, I only have this options for the CiviCRM module:
access CiviCRM
access CiviMail
access CiviMember
access uploaded files
add contacts
administer CiviCRM
edit all contacts
edit groups
edit memberships
import contacts
profile listings and forms
view all contacts
While I have 2 'normal' groups and 3 smart groups.
Comment #3
GregoryHeller commentedI am not sure why you are not seeing access options for:
edit contacts in Confirmed Users
view contacts in Confirmed Users
and similar options for all of your groups.
Comment #4
stroobl commentedIn CiviCRM 1.6, the ACLs seem to be moved to the integrated CiviCRM access control module. (many thanks to Dave Greenberg on civicrm-dev to point that out ;-)
I tried to get your module working with CiviCRM 1.6, but it seems to fail, even after adding the group view permission to other users. I guess the changed ACL functions breaks civicrm count block?
Comment #5
douggreen commentedI'm not able to reproduce your problem. I reinstalled CiviCRM 1.6 on a Drupal 5 rc2 site and all seems to work fine for me. See the two blocks on the bottom left at http://drupal5.douggreenconsulting.com/.
Try setting the 'Count Precision' to "exact"; the default is to round to the nearest hundred, so if you have less than 50 people in your group, it will show 0.
Comment #6
stroobl commentedI think I found out what's wrong: CiviCRM count block probably has problems counting members in smart groups. Is it possible that it doesn't always count the members based on search criteria (unless you're an admin)?
Since I added the groups to our user profile and selected that particular group for two users, the counter says "2" now. The other users in the group (based on a field set in there profile) are ignored now.
When counting for a normal group and not a smart group, everything seems to work as expected.
Comment #7
GregoryHeller commentedOn http://www.defectivebydesign.org the count block on the right hand side is displaying the count of users in a smart group. However this site is not yet using civicrm 1.6.
I have just checked on drupal 1.6 and indeed the access controls are different.
It seems that there is no way to grant any permissions to anonymous users under civicrm 1.6. Without the ability to grant permission to anonymous users, I don't think that this module will work as written.
Comment #8
douggreen commentedComment #9
douggreen commentedComment #10
douggreen commentedThanks for reporting this! I've been able to reproduce with CiviCRM 1.6 smartgroups on Drupal 4.7 and Drupal 5.0.
Additionally, I get the following CiviCRM error.
I'll report the above problem and work with the CiviCRM team to find a solution to the smartgroup counting.
Comment #11
douggreen commentedSee also http://issues.civicrm.org/jira/browse/CRM-1535
Comment #12
douggreen commentedThe temporary solution is to grant anonymous users permission to "View All Contacts". Another option is to manually patch CiviCRM shown in CRM-1535. The long term solution is to implement CiviCRM Access Control List's (ACL's) for anonymous users, which, after some discussion may be under consideration for CiviCRM 1.7.
Since this was posted as a Drupal issue, since there is a Drupal work-around, and since the solution really lies with CiviCRM, I'm closing this issue.