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.

Comments

develcuy’s picture

Version: 5.x-1.x-dev » 5.x-1.1
Status: Postponed (maintainer needs more info) » Active

Unfortunately subscriptions_og still not supports og 7.x #259029: How do I set up automatic subscription to Group?, and I'll be so busy for a while.

Blessings!

marcp’s picture

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.

marcp’s picture

Status: Active » Needs review

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.

marcp’s picture

Version: 5.x-1.1 » 5.x-1.1-1

Changing version to 5.x-1.1-1 since it's still an issue with this version.

marcp’s picture

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.

develcuy’s picture

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!

develcuy’s picture

Version: 5.x-1.1-1 » 5.x-1.x-dev
Status: Needs review » Postponed (maintainer needs more info)

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!

marcp’s picture

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.

develcuy’s picture

How does it goes?

Status: Active » Postponed (maintainer needs more info)