Notice: Use of undefined constant OG_ACCESS_REALM - assumed 'OG_ACCESS_REALM' in og_subgroups_node_grants() (line 75 of /path/to/drupal/sites/all/modules/contrib/og_subgroups/og_subgroups.module).

If og_access module isn't enabled, this error appears when creating subgroups.

The solution is to either have this module depend on og_access, or throw in a module_enabled('og_access') conditional wrapper around line 75.

Comments

kenianbei’s picture

Status: Active » Closed (fixed)

Hi Shawn, thank you for the bug report. I've added a new patch which removes reliance on hook_node_grants(). If you have time can you please review and direct all discussion to that issue. Thanks!

Norman

hefox’s picture

Status: Closed (fixed) » Postponed

Postponed on other issue, as not fixed in current -dev and if that patch doesn't get in, this is still an issue

hefox’s picture

Issue summary: View changes

typo

seanb’s picture

Issue summary: View changes
Status: Postponed » Needs review
StatusFileSize
new917 bytes

Since the latest patches in issue https://www.drupal.org/node/1956426 are not removing hook_node_grants() anymore, I think it would be nice to include a small check to remove the error.
If the function gets removed after all it wouldn't hurt to have this temp fix right? It seems that removing hook_node_grants() is not going to happen anytime soon...

Patch is attached.

  • hefox committed d6d7492 on 7.x-2.x
    Issue #1994002 by seanb, hefox: check if og_access exists
    
hefox’s picture

Status: Needs review » Fixed

thanks

Status: Fixed » Closed (fixed)

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