og_access.module defines some constants which spaces.module assumes are set. If the og_access.module is not enabled (like for a group site w/ all public groups) then the values in the $spacetype_mask are set wrong. In function spaces_groupmask, in $op 'check'

case 'check':
      foreach ($spacetype_mask as $key => $type) {
        if ($og_settings == $type['mask']) {
          return $key;
        }
      }

you end up with an array like:

Array
(
    [og_selective] => 0
    [og_directory] => 1
    [og_register] => 1
    [og_private] => 0
)
Array
(
    [og_selective] => 3
    [og_directory] => 0
    [og_register] => 1
    [og_private] => OG_PRIVATE_GROUPS_ALWAYS
)
Array
(
    [og_selective] => 3
    [og_directory] => 1
    [og_register] => 1
    [og_private] => OG_PRIVATE_GROUPS_NEVER
)
Array
(
    [og_selective] => 0
    [og_directory] => 1
    [og_register] => 1
    [og_private] => OG_PRIVATE_GROUPS_NEVER

Instead of:

Array
(
    [og_selective] => 0
    [og_directory] => 1
    [og_register] => 1
    [og_private] => 0
)
Array
(
    [og_selective] => 0
    [og_directory] => 1
    [og_register] => 1
    [og_private] => 0
)
Array
(
    [og_selective] => 0
    [og_directory] => 1
    [og_register] => 1
    [og_private] => 0
)
Array
(
    [og_selective] => 0
    [og_directory] => 1
    [og_register] => 1
    [og_private] => 0
)

the undefined constants just get passed through as the constant names, as opposed to as their values (since they're not defined).

The attached patch conditionally defines these two missing constants if PHP cannot find them already. I know there are some plans to change how masking works, so for now, this diff suggests sticking them at the top of spaces.module w/ the other spaces constants.

Ian

CommentFileSizeAuthor
spaces_without_og_access.diff491 bytesIan Ward

Comments

moshe weitzman’s picture

It might make sense to move those constants to og.module so they are always present. Let me know what you think.

Ian Ward’s picture

Status: Needs review » Fixed

hey Moshe, Young patched spaces for this issue; it just checks now whether those constants are defined, and if not then spaces sets its own values (but does not define the actual constants). The change is here http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/spaces/spac...

Ian

Anonymous’s picture

Status: Fixed » Closed (fixed)

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