I know we shouldn't allow OG groups in each OG vocab, but what about in the main administer >> categories edit vocab screen. Maybe I just don't know the limitations of OG vocab, but I'd like to organize my OG groups using a vocab called "Course categories", but also let groups define their own categories for categorizing nodes within each group like Week 1, Week 2, etc.

CommentFileSizeAuthor
#6 og_vocab.module_0.patch1.06 KBRobRoy

Comments

moshe weitzman’s picture

i don't understand the request

RobRoy’s picture

Okay, I want to organize my 'group' nodes into categories. Each group is a course at a high school let's say. I want to allow people to easily find groups so I create a vocabulary called Course categories that would have stuff like Art, Business, Math, etc. So I want each group node to be placed IN one of these terms, but once I install og_vocab it removes the group node from the list of available nodes on the edit vocabulary page.

In other words, I want to categorize groups nodes using taxonomy, but once I install og_vocab (to have separate vocabs INSIDE of each group which is differente than what I want to do above) I can't.

Did that make sense? Is there a reason to omit group node types from non-og_vocab vocabularies?

moshe weitzman’s picture

ok, now i understand the bug. but i can't reproduce it on 4.7 at least. i am seeing the global vocabs just fine when i edit a group on groups.drupal.org

RobRoy’s picture

This is for HEAD actually, but the form_alter code is the same as 4.7 I think. It's just the og_vocab_form_alter() is unsetting those types for all 'taxonomy_form_vocabulary' form_id's and not just when we are on the og add page.

As a side note, I found a couple undefined vars too. Do you want issues for these?

The local variable $access may not have been initialized Drupal HEAD #2/sites/all/modules/og_vocab og_vocab.module
line 50 1163056630202 47063

The local variable $prefix may not have been initialized Drupal HEAD #2/sites/all/modules/og_vocab og_vocab.module
line 143 1163056630202 47064

moshe weitzman’s picture

just to be sure, are you using latest og and og_vocab?

RobRoy’s picture

Status: Active » Needs review
StatusFileSize
new1.06 KB

I got them last night. I'm just getting back into OG and friends, so I wanted to make sure I had my head on right before I submitted any patches. But couldn't we just include the omit code in that if () block in the form_alter? I attached a patch for HEAD, but haven't tested it or know enough about OG yet to figure out if that is the right way to go about it.

$Id: og.module,v 1.277 2006/11/06 22:03:30 weitzman Exp $
$Id: og_vocab.module,v 1.8 2006/10/11 02:09:26 weitzman Exp $

redraven’s picture

I believe this is related.

On 5 beta with og_vocab head

When I use the og_vocab module, I can no longer assign vocabs to node-type that have been excluded/omitted from group use. This include the actual group node too, as suggested in this post

Is this a bug or simply not designed to accommodate both use within groups and associated node types, and also allow omitted node types to have taxonomies?

Thanks

redraven’s picture

I tried the above patch, and it does expose all node types in the admin of the taxonomy, but when I submit content, none of the vocabs are offered in any of the selected node-types

bonobo’s picture

I'm seeing something similar using the latest 4.7.x code, both of Drupal and OG -- I initially posted this as an og issue, but upon further examination it became clear that this was more an og_vocab issue --

From my follow-up comment on my original post:

------------
When og_vocab is enabled, any node type that is either:

a. used for creating an organic group; or
b. exempt from appearing within an organic group

does not appear in the list of node types when adding/editing vocabularies at either admin/taxonomy/add/vocabulary or admin/taxonomy/edit/vocabulary/x

The workaround is to add a new node type, temporarily disable og_vocab, adjust taxonomy as necessary, and re-enable og_vocab
--------------------

I'm not keen on patching core to get this done, as that has some potentially unpleasant consequences :\

bonobo’s picture

The "patching core" reference, btw, was in relation to this thread, which might be (?) related as well?

http://drupal.org/node/99927

moshe weitzman’s picture

Status: Needs review » Fixed

i finally reread and grokked the bug and the patch. fixed.

Anonymous’s picture

Status: Fixed » Closed (fixed)