This module currently doesn't work with the newer and likely to be more widely used going foward 7.x-2.x version of the OG module because of changes to the way that the $group entity is loaded.
Without this patch if you enable the module on a site using og-7.x-2.x you can add the group theme field to you group content type however when you try and visit the group page you'll get a PHP error. This converts og_theme_custom_theme() to use entity_load_single() instead of $group->getEntity(); which is causing problems here.
I've also re-named the $group variable to $context and the $entity variable to $group as it makes what's going on here clearer.
You might also want to roll a new release of the module with this patch applied and tag it 7.x-2.x so that it's clear this version is for use with og-7.x-2.x.
| Comment | File | Size | Author |
|---|---|---|---|
| og_theme-7x2x_compatibility-eojthebrave.patch | 1.36 KB | eojthebrave |
Comments
Comment #1
netw3rker commentedThis patch appears to have a hard dependency on og_context module. be sure to update the .info file to denote that, otherwise sites that dont have that enabled will WSOD after applying the patch.
Comment #2
Crell commentedThat hard dependency was there already. That should be a separate issue.
I've confirmed that this patch does work with the latest tagged OG release, though. Bumping to critical since a fatal is, in fact, critical. :-)
Agreed with the OP that a new branch is probably wise.
Comment #3
amitaibuI've changed a bit the patch to use entity_metadata_wrapper(), and created a new branch.
Please give me an ok on the committed patch, and I'll roll a stable release.
Comment #4
Crell commentedI just checked out the 2.x branch in my local test site and it worked swimmingly. No errors. I'd say it's stable ready.
yay!
Comment #5
amitaibuThanks Larry, created new release -- http://drupal.org/node/1699650