variable og_node_types is incompatible with latest OG

Bob Morse - June 17, 2008 - 20:18
Project:OG Block Visibility
Version:5.x-1.x-dev
Component:Miscellaneous
Category:support request
Priority:critical
Assigned:paulbooker
Status:closed
Description

When I try to configure a block and click the Group visibility settings I get the message "No group types have been defined. Please define at least one group node type under administer >> settings >> og". That link doesn't work. But I have group node types defined already.

#1

ambereyes - July 6, 2008 - 17:37
Title:Assign Content Type» Checking Wrong Content Type Variable
Priority:normal» critical

I had the same problem, apparently the latest version of og no longer uses the variable this module is searching for, i. e. "og_node_types".

So this module needs some serious updating to match the current version of og.

#2

paulbooker - July 21, 2008 - 13:34
Version:5.x-1.1» 5.x-1.x-dev
Assigned to:Anonymous» paulbooker

#3

rbisso - August 22, 2008 - 23:23

Getting the same problem. Thanks for your help, Paul!

#4

JohnAlbin - August 30, 2008 - 17:02
Title:Checking Wrong Content Type Variable» variable og_node_types is incompatible with latest OG
Assigned to:paulbooker» Anonymous
Status:active» needs review

The latest OG uses og_get_types('group') to get a list of node types that are groups. This patch checks for the existence of this function before using it, and if it doesn't find it, it uses the old variable_get('og_node_types', array('og')) method. So the og_block_visibility.module will remain compatible with older versions of OG as well.

This patch plus the one in #298532: .info file broken and DRUPAL-5 contains module_exist(), a 4.7 function were required to get this module working with the latest OG.

AttachmentSize
og-get-types.patch 800 bytes

#5

paulbooker - September 1, 2008 - 13:44
Assigned to:Anonymous» paulbooker
Status:needs review» fixed

Thanks for this patch

temp

Anonymous (not verified) - September 15, 2008 - 13:55

Automatically closed -- issue fixed for two weeks with no activity.

#6

Anonymous (not verified) - September 15, 2008 - 14:23
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.