I have downloaded the latest version of og_vocab module.
When I create a group I keep on getting a series of warnings as below:
Invalid argument supplied for foreach() in C:\htdocs\drupal\modules\og_vocab\og_vocab.module on line 54.
This continues until and unless I create a vocabulary. So, I have added a small fix to the og_vocab_menu(). I have added a condition to check if the vocabularies do exist for the following foreach() statement
if($groupnode->og_vocabularies)
{ //my code
foreach ($groupnode->og_vocabularies as $vid => $vocabulary) {
$items[] = array('path' => "node/$gid/og/vocab/terms/$vid",
'title' => $vocabulary->name,
'callback' => 'taxonomy_overview_terms',
'callback arguments' => array($vid),
'type' => MENU_CALLBACK,
'weight' => -10);
$items[] = array('path' => "node/$gid/og/vocab/terms/$vid/list",
'title' => t('list'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10);
$items[] = array('path' => "node/$gid/og/vocab/terms/$vid/add/term",
'title' => t('add term'),
'callback' => 'taxonomy_form_term',
'callback arguments' => array(array('vid' => $vid)),
'type' => MENU_LOCAL_TASK);
$items[] = array('path' => "node/$gid/og/vocab/edit/vocabulary/$vid",
'title' => t('edit vocabulary'),
'callback' => 'taxonomy_admin_vocabulary_edit',
'callback arguments' => array($vid),
'type' => MENU_CALLBACK);
}
}//end of if
This fixes the errors and everything is working fine.
1 feature request is that create at least one vocabulary for every group automatically so that other users can start tagging their posts in the group. I am working on this and will update you soon.
Comments
Comment #1
moshe weitzman commentedi don't see how og_vocabularies can be anything but an array for a group node. please dig a bit more and see why the nodeapi('load') is not doing that it should for that node.
Comment #2
amitaibuI think this issue is old enough to be closed...