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
| Comment | File | Size | Author |
|---|---|---|---|
| spaces_without_og_access.diff | 491 bytes | Ian Ward |
Comments
Comment #1
moshe weitzman commentedIt might make sense to move those constants to og.module so they are always present. Let me know what you think.
Comment #2
Ian Ward commentedhey 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
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.