group list is empty
ashledombos - April 20, 2009 - 14:04
| Project: | Organic Groups - Multiple Mandatory Groups by Role |
| Version: | 6.x-1.3 |
| Component: | User interface |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Description
Hello
in Available Groups the "Open or Closed Groups" is empty.
However i really created groups. How can i make them appear in the list ?
regards
Raphaël

#1
Same problem here.
I also got this error:
user warning: Unknown column 'o.selective' in 'where clause' query: SELECT n.nid, n.title, o.* FROM node n INNER JOIN og o ON n.nid = o.nid WHERE (o.selective = 3 OR o.selective = 0) ORDER BY n.title in ~SITEPATH~/httpdocs/sites/all/modules/og_multiple_mandatory_groups_by_role/og_multiple_mandatory_groups_by_role.module on line 645.EDIT:
Also just to be clear. I have an open group and a closed group. So i know that is not the issue.
#2
Ok so i tracked down the problem. Im not sure if this was caused by a OG update or not but I am currently using Organic groups 6.x-1.3.
This is the first time i have submitted a patch so i hope it works. Looks like it will though.
#3
it worked for me :) thanks !
#4
Fixed the problem.
#5
This may seem like a silly question, but how do I patch the module?
#6
http://drupal.org/patch/apply
Read this for a definitive answer.
place the patch in the root directory of the module.
sites/all/modules/og_multiple_mandatory_groups_by_role/og_multiple_mandatory_groups_by_role.patch
then cd into that directory in terminal and to this patch -p0 < og_multiple_mandatory_groups_by_role.patch
TaDa!
#7
patch worked, thanks
#8
The patch worked for me as well. Many thanks.
#9
Ditto on the patch working correctly. Kudos to jackinloadup.
It's hard to believe the last release for this module was well over a year ago. How could something this fatal be allowed to persist for that long? Has the maintainer abandoned the project?
#10
After applying the two aforementioned fixes, modifying the code at line 646 as follows will fix the empty group list issue as well:
$option_result = db_query("SELECT n.nid, n.title, o.* FROM {node} n INNER JOIN {og} o ON n.nid = o.nid WHERE (o.og_selective = %d OR o.og_selective = %d) ORDER BY n.title", OG_CLOSED, OG_OPEN);if( db_affected_rows($option_result) <= 0 ) {
$options = array( "" => "(no groups enabled)" );
}
else {
while ($group = db_fetch_object($option_result)) {
$options[$group->nid] = $group->title;
switch ($group->og_selective) {
case OG_OPEN:
$options[$group->nid] .= ' | ' .t('Open group, users can unsubscribe.');
break;
case OG_CLOSED:
$options[$group->nid] .= ' | ' .t('Closed group, users can not leave.');
break;
}
}
}
#11
OK - I fixed the delete issues as well. As far as I can tell all problems are resolved if you apply the following patch. See #6 for instructions and substitute this patch file:
#12
Some final cosmetic changes ...
- User and group names are reported instead of their ID's when applying changes.
- The menu tab order was rearranged to make better sense. This change may require you to perform a page cache flush.
This following patch file is comprehensive and was developed against release 6.x-1.3:
#13
When trying to apply the patch I get this:-
Hmm... Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- og_multiple_mandatory_groups_by_role.module 2009-09-14 12:04:29.2579
43800 -0400
|+++ og_multiple_mandatory_groups_by_role.20090915.module 2009-09-14 17:38
:18.133622100 -0400
--------------------------
Patching file og_multiple_mandatory_groups_by_role.module using Plan A...
Hunk #1 succeeded at 65.
Hunk #2 succeeded at 75.
Hunk #3 succeeded at 97.
Hunk #4 succeeded at 108.
Hunk #5 succeeded at 117.
Hunk #6 succeeded at 126.
Hunk #7 succeeded at 144.
Hunk #8 succeeded at 495.
Hunk #9 succeeded at 528.
Hunk #10 succeeded at 604.
Hunk #11 succeeded at 640.
Hunk #12 FAILED at 655.
Hunk #13 succeeded at 765.
Hunk #14 succeeded at 813.
Hunk #15 succeeded at 858.
1 out of 15 hunks FAILED -- saving rejects to file og_multiple_mandatory_groups_
by_role.module.rej
done
Anyone have any ideas?
#14
Hi Nialhatton -
I had the same thing happen to me when I only applied the latest patch (#12).. when I tried again and applied first the patch in #2 and then the #12 patch, it worked.
This module provides important functionality for me - many thanks to the original developers. I hope it gets picked up again and these improvements are in a future release.
-T
#15
kudos to the developer and the patch makers - installed and applied patch in #2 and #12 as suggested in #14 and yay all seems good.
so finally have a way of getting anybody who is given a particular role to be added to a particular group - cuts out a whole step when we want to add users to a particular OG that is private and hence not on the 'add user' screen.