Our site has dozens of subgroups in 3 parent groups, as well as about 100 other normal OGs not in the hierarchy. Starting almost a month ago, NO groups appear in the Audiences menu on the node add/edit form (see attached screenshot). I am an admin so I usually see the 4 or 5 of which I'm a member, and then the long list of others.
I'm not sure this problem is because of subgroups, but I also noticed a ton of PHP errors in the log like this:
Table 'hastac_3.og_subgroups' doesn't exist query: SELECT og.nid, og.og_private, og.og_selective, n.title, n.status, n.type FROM og og INNER JOIN node n ON og.nid = n.nid LEFT JOIN og_subgroups ogs ON og.nid = ogs.gid WHERE ogs.gid IS NULL in /var/www/html/hastac/sites/all/modules/og_subgroups/includes/tree.inc on line 76.
I don't know enough PHP to have any idea what the above means, unfortunately. I've already tried flushing the cache and rebuilding permissions. Other suggestions?
| Comment | File | Size | Author |
|---|---|---|---|
| Screen shot 2011-06-15 at 11.26.02 AM.png | 17.57 KB | rubyji |
Comments
Comment #1
rubyjiAlso... I just disabled the Subgroup module on my development site and the Audiences reappeared! Let's hope this change doesn't break something else...
Comment #2
mstef commentedThis isn't the module's fault.
Looking at the query, I see that 1) the "table" doesn't exist, and 2) you're using table prefixes. The only way the table doesn't exist if it you manually deleted the table, you have a misconfiguration with your table prefixes (specified in settings.php), you uninstalled the module but then enabled it manually via the system table (or something weird like that).
I'd take a good look at your database to see what's going on first. If you can't find anything, you can ping back in here.
Comment #3
MauPalantir commentedWell, actually I have also met a similar bug, wihout any table prefixes or error log messages.
I don't see any Groups NOT enabled for group hierarchy in the Group Audience box.
I looked quickly into the Subgroups source and I think this is because in
og_subgroups_form_alterthe options array for the Group Audience box is entirely rewritten by Subgroups and the options are generated by the same function that generates the parent selection options:og_subgroups_group_select_options;And it apparently deals only with group types that participate in Subgroups hierarchy.
This was not a problem when Subgroups did not care about group types when creating the tree, but since then you introduced the feature of enabling hierarchy per node type.
Comment #4
bschilt commentedLooks like there are two problems in this ticket. 1) standard groups don't show up in the audience selector and 2) some issue possibly due to table prefixes.
#1 is valid and I can confirm that when creating content that is a group post, only "subgroup" groups show up. We need a way for standard groups to be selectable as well.
#2 I'm going to ignore per comment 2 above. If that error message continues, create another issue.
Comment #5
bschilt commentedI committed a fix for this issue. Standard groups will now remain in the audience selector.