Forums | Mahara Community

Support /
Can't add new group members


sean mcclelland's profile picture
Posts: 31

31 August 2013, 10:32

I am unable to add any new users to groups. Email notifications get sent, and you can see the group that just joined (for a moment, anyway), but you don't appear on the members tab of the group, and as soon as you click on the Collections tab, you get the error "You must join the group 'Sean = glitch test group' to see this page."

I've tried different group membership options, doesn't seem to help the problem.

We applied this patch (https://bugs.launchpad.net/mahara/+bug/1212863) and it only partially fixed the problem. Now, if we create a brand new group, all is well, but existing groups still have the problem.

So right now, no users can join any groups, unless the group is created new.

Ideas?!

 

 

Kristina Hoeppner's profile picture
Posts: 4859

02 September 2013, 7:55

Hi Sean,

Remind me again please which version of Mahara you are using? Was it 1.6 or already 1.7? Did you get the same error message as reported in the bug or was it a different one?

Cheers

Kristina

 

Aaron Wells's profile picture
Posts: 896

03 September 2013, 15:28

A couple more questions Wink

- Are you using Postgres or MySQL?

- Do you see any error messages or warnings in your PHP error logs when you try to add a user to a group?

From what you're describing, it sounds like the code goes all the way through with the process of adding the user to the group, even to the point of sending the notification, but then it all gets rolled back. It so happens that all the parts of adding a user to a group actually are wrapped in code to try to do it all in one database transaction which gets rolled back if any part of it fails, so as to avoid leaving incomplete records in place. So it may be something along those lines that's happening. If you see any error messages in your logs, that would be very helpful towards figuring this out.

Cheers,

Aaron

anonymous profile picture
Account deleted
Posts: 4

04 September 2013, 8:50

Hi Aaron,

I'm working with Sean on this issue over here.

To answer your questions:

- we are running Mahara on PostgreSQL v8.4.13

- we are on Mahara 1.6.6.

Here a (sanitized) excerpt from the server logs containing the error messages that get generated when a user attempts to join a group:

[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] [WAR] 2d (lib/errors.php:749) Command was: INSERT INTO "interaction_forum_subscription_forum" ("user", "forum", "key") VALUES (?, ?, ?) and values was (3473,333,687bdf0c), referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] Call stack (most recent first):, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * log_message("Failed to get a recordset: postgres7 error: [-5: E...", 8, true, true) at /web/mahara/mahara/htdocs/lib/errors.php:109, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * log_warn("Failed to get a recordset: postgres7 error: [-5: E...") at /web/mahara/mahara/htdocs/lib/errors.php:749, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * SQLException->__construct("Failed to get a recordset: postgres7 error: [-5: E...") at /web/mahara/mahara/htdocs/lib/dml.php:1068, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * insert_record("interaction_forum_subscription_forum", object(stdClass)) at /web/mahara/mahara/htdocs/interaction/forum/lib.php:410, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * PluginInteractionForum::user_joined_group("userjoinsgroup", array(size 5)) at Unknown:0, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * call_user_func_array(array(size 2), array(size 2)) at /web/mahara/mahara/htdocs/lib/mahara.php:1359, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * call_static_method("PluginInteractionForum", "user_joined_group", "userjoinsgroup", array(size 5)) at /web/mahara/mahara/htdocs/lib/mahara.php:1468, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * handle_event("userjoinsgroup", object(stdClass)) at /web/mahara/mahara/htdocs/lib/group.php:858, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * group_add_user("329", "3473") at /web/mahara/mahara/htdocs/lib/group.php:1190, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * joingroup_submit(object(Pieform), array(size 4)) at Unknown:0, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * call_user_func_array("joingroup_submit", array(size 2)) at /web/mahara/mahara/htdocs/lib/pieforms/pieform.php:514, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * Pieform->__construct(array(size 4)) at /web/mahara/mahara/htdocs/lib/pieforms/pieform.php:161, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * Pieform::process(array(size 4)) at /web/mahara/mahara/htdocs/lib/pieforms/pieform.php:71, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * pieform(array(size 4)) at /web/mahara/mahara/htdocs/lib/group.php:1076, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * group_get_join_form("joingroup", "329", "view") at /web/mahara/mahara/htdocs/group/view.php:73, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] , referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] [WAR] 2d (lib/mahara.php:1472) Event userjoinsgroup caused an exception from plugin PluginInteractionForum with function user_joined_group. Continuing with event handlers, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] Call stack (most recent first):, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * log_message("Event userjoinsgroup caused an exception from plug...", 8, true, true) at /web/mahara/mahara/htdocs/lib/errors.php:109, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * log_warn("Event userjoinsgroup caused an exception from plug...") at /web/mahara/mahara/htdocs/lib/mahara.php:1472, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * handle_event("userjoinsgroup", object(stdClass)) at /web/mahara/mahara/htdocs/lib/group.php:858, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * group_add_user("329", "3473") at /web/mahara/mahara/htdocs/lib/group.php:1190, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * joingroup_submit(object(Pieform), array(size 4)) at Unknown:0, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * call_user_func_array("joingroup_submit", array(size 2)) at /web/mahara/mahara/htdocs/lib/pieforms/pieform.php:514, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * Pieform->__construct(array(size 4)) at /web/mahara/mahara/htdocs/lib/pieforms/pieform.php:161, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * Pieform::process(array(size 4)) at /web/mahara/mahara/htdocs/lib/pieforms/pieform.php:71, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * pieform(array(size 4)) at /web/mahara/mahara/htdocs/lib/group.php:1076, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] * group_get_join_form("joingroup", "329", "view") at /web/mahara/mahara/htdocs/group/view.php:73, referer: https://XXXXXXX/group/seantest1
[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] , referer: https://XXXXXXX/group/seantest1

I checked the "interaction_forum_subscription_forum" for possible duplicates/unique-key contraint violation, but that's not the case. So I'm a bit stumped at this point, but will dig further.

There may be other (related) issues with assigning users to groups, I'm still trying to replicate/confirm them.

anonymous profile picture
Account deleted
Posts: 4

04 September 2013, 11:14

actually, it is a duplicate key violation after all (i didnt snip the whole error message, sorry about that).

here is what's missing from it:

 

[Tue Sep 03 10:52:15 2013] [error] [client XXX.XXX.XX.XXX] [WAR] 2d (lib/errors.php:749) Failed to get a recordset: postgres7 error: [-5: ERROR: duplicate key value violates unique constraint "inteforusubsforu_usefor_pk"] in adodb_throw(INSERT INTO "interaction_forum_subscription_forum" ("user", "forum", "key") VALUES (?, ?, ?), Array), referer: https://XXXXXX/group/seantest1
anonymous profile picture
Account deleted
Posts: 4

04 September 2013, 12:02

ok, looks like we nailed the problem down to a duplication of entries in the "interaction_forum_instance_config" table.

we see this for a number of older groups/forums in our database, but not for newly created ones. so we'll address this as a data-cleanup issue (remove the dupes) and be done with it.

Kristina and Aaron, thanks for looking into it.

Aaron Wells's profile picture
Posts: 896

04 September 2013, 13:31

I'm glad to hear you've got it solved. If you can pin it down to a particular bug in the code, please let us know. Smile

Cheers,

Aaron

7 results