Forums | Mahara Community

Support /
Small bug in 1.1.1 relating to groups?


anonymous profile picture
Account deleted
Posts: 18

18 March 2009, 8:01

I think that there is probably small bug in group module. If it isn’t than it is problem with My upgrade from 1.06 to 1.1.1.

Background:
I have one group:
- 214 members
- 2 pending member

Bug:
On My Groups page I am seeing message: "There are 448 pending membership requests for this group" which is obviously wrong as in group view page is displayed correct  "There are 2 pending membership requests for this group".

So the number of pending members is multiplied with current members (some left / inner join mistake??)

Function that fill the necessary data is group_get_associated_groups (lib(group.php). I have made print_r of $groups on line 1083 and I get the following:

Array
(
    [34] => stdClass Object
        (
            [name] => OPM_09
            [description] => My group
           [jointype] => request
            [grouptype] => standard
            [membershiptype] => admin
            [reason] =>
            [role] => admin
            [membercount] => 428
            [requests] => 428
            [id] => 34
        )
)

But If I go and click on the group everything is OK…that is I see 214 members and 2 membership requests, so wrong number is only visible under main "My Group" page.

anonymous profile picture
Account deleted
Posts: 1643

18 March 2009, 18:31

Hi - yes that looks weird, I have made a bug report for it. What database type are you using?
anonymous profile picture
Account deleted
Posts: 18

19 March 2009, 4:26

Hi,
we are on MySQL 5.032. I will try to find time today or tomorrow to look into it in. But the problem looks like to be in the db query because it is always giving the number of pending members multiplied with current members.

I could change this so the number of pending members wouldn't be shown on the "My Groups" page (since it is OK in the group view) but I would like to be sure that this is bug in the current release and not in the upgrade process from 1.06.

anonymous profile picture
Account deleted
Posts: 1643

19 March 2009, 5:54

Yeah it does look like it's the query. There's two COUNT()s being done in the same query, which might be causing a bit of an issue.
anonymous profile picture
Account deleted
Posts: 18

19 March 2009, 7:13

Yes,

COUNT(gm.member) AS membercount, COUNT(gmr.member), but the problem is probably in one of JOIN's in that query.

anonymous profile picture
Account deleted
Posts: 808

14 April 2009, 20:14

Yep, the query was broken, it was nothing to do with the upgrade.  Will be fixed in the next release.
anonymous profile picture
Account deleted
Posts: 18

15 April 2009, 0:03

Great, thanks for the replay.

 

7 results