Install fails because latest versions of og does not use variable og_node_types
dalin - June 2, 2008 - 13:35
| Project: | Organic Groups Subscriptions |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
The install routine calls subscriptions_og_get_groups_by_types() which pulls og_node_types variable, however this is no longer used by og. This results in subscriptions_og_get_groups_by_types() returning a null, which confuses the rest of the install. I think you'll need to query the og table, or there may be some internal og function that will give you that information.

#1
Unfortunately subscriptions_og still not supports og 7.x #259029: How do I set up automatic subscription to Group?, and I'm busy for a while(paying bills). If you really need this urgent, I'm sorry to say will need some bounty.
Blessings!
#2
Haven't had time to test this yet, but you should be able to change all occurrences of:
variable_get('og_node_types', array());to:
og_get_types('group');because og_get_types('group') will return an empty array if there are no node types configured as groups.
I'll attach a patch if and when I get this working unless someone beats me to it.
#3
Attached is the patch. It makes all the changes above and one more change -- subscriptions_og_get_groups_by_types() now returns an empty array if there are no types configured as groups, and presumably if there are no nodes of any types that are configured as groups.
The installation now works cleanly on a site that has no nodes configured as group types, and I suspect installation will work as before when there are nodes configured as group types, but that has yet to be tested.
#4
Changing version to 5.x-1.1-1 since it's still an issue with this version.
#5
Note also that I haven't done a compatibility check with the rest of og5.x-7.2, but this patch ought to help the next person continue on down the path.
#6
Thank you very much @marcp and @dalin for your effort on it. I went to Cusco city(Perú) 4 days ago so will take another week for me to check patches and perform test, but thank you again.
Blessings!
#7
I can't see any patch, but followed your comments, current dev version should install and migrate og notifications to subscriptions without issues. Please review http://drupal.org/node/272808#comment-896677 for further instructions.
Blessings!
#8
You mean I have to attach the patch and not just pretend that it's attached? I'm glad you got the code in there without it because I can't even find the patch now!
Might be a while before I get a chance to test this, though.
#9
How does it goes?