Number of group members

Bug Reports
  • Bug: The number of group members does not show correct numbers.

    • We have 28 members in the first group, but it shows "-10"

    • We have 8 members in the 2nd one, but it shows 9

    • We have only 3 members in the 3rd one, but it shows 4 and it puts "..." as if there are more members to see...

    These groups are based on "Rewards" system, so for example if you have either 500 posts or 500 reputation point you go into 1st one, when you have 1000 posts or reputation, it deletes you from the 1st one, and adds you to the 2nd one, and so on...

    I do not know why forum shows wrong numbers but I have to say rewards system page in ACP also does not work perfectly, when you add a reward rule, the rule is doubled on page by itself, when you restart the forum the order changes, so you have to go through find the duplicates and delete etc. so, there is something funny going on there... I thought it might affect the count.

    But this bug is not a functional error, it is just make up, it does not affect any group related usage 🙂 so reward system works fine and if you click the group name, it shows members correctly. The problem is only on rewards page in ACP and also in the information on "" page.

    Screen Shot 2019-10-10 at 1.00.42 AM.png

    This is 3rd group, we have only 3 members in this group:
    Screen Shot 2019-10-10 at 1.01.54 AM.png

  • You can fix the counts by running the following query in mongodb for each group that has the wrong member count.

    // get number of users
    db.objects.count({_key: "group:<replace_with_group_name>:members"});
    // update group object
    db.objects.update({_key: "group:<replace_with_group_name>"}, {$set: {"memberCount": <replace_with_value_from_previous_query>}});

Suggested Topics