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

jackinloadup - May 22, 2009 - 16:32

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

jackinloadup - May 22, 2009 - 16:49
Category:support request» bug report
Status:active» needs review

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.

AttachmentSize
og_multiple_mandatory_groups_by_role.patch 1.25 KB

#3

ashledombos - May 22, 2009 - 20:05

it worked for me :) thanks !

#4

Steve Dondley - June 3, 2009 - 02:06
Status:needs review» reviewed & tested by the community

Fixed the problem.

#5

Janam - July 1, 2009 - 23:47

This may seem like a silly question, but how do I patch the module?

#6

jackinloadup - July 2, 2009 - 15:22

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

inforeto - July 17, 2009 - 18:50

patch worked, thanks

#8

Mirabuck - July 18, 2009 - 11:37

The patch worked for me as well. Many thanks.

#9

Bacteria Man - September 9, 2009 - 04:00

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

tjsaker - September 14, 2009 - 15:35

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

tjsaker - September 14, 2009 - 16:09

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:

AttachmentSize
og_multiple_mandatory_groups_by_role.20090914.patch 4.24 KB

#12

tjsaker - September 16, 2009 - 02:59

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:

AttachmentSize
og_multiple_mandatory_groups_by_role.20090915.patch 11.64 KB

#13

niallhatton - October 18, 2009 - 18:37

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

tobias - October 21, 2009 - 12:39

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

peted - November 22, 2009 - 00:42

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.

 
 

Drupal is a registered trademark of Dries Buytaert.