Download & Extend

Undefined property: stdClass::$group_access when saving group

Project:Spaces
Version:7.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Notice: Undefined property: stdClass::$group_access in space_og->access_space() (line 69 of /home/og7/public_html/sites/all/modules/contrib/spaces/spaces_og/plugins/space_og.inc).

<?php
 
/**
   * Override of access_space().
   */
 
function access_space($account = NULL) {
    global
$user;
   
$account = isset($account) ? $account : $user;

    return
parent::access_space($account) && (
     
user_access('administer group') ||
     
$this->group->{OG_ACCESS_FIELD}[LANGUAGE_NONE][0]['value'] != 1 || // Group is public, allow access
     
og_is_member($this->og->gid, 'user', $account) || // User is group member, allow access
     
user_is_anonymous()); // User hasn't logged in -- provide entry point
 
}
?>

Comments

#1

also seeing this when viewing group content:

Notice: Undefined property: stdClass::$group_access in space_og->access_space() (line 69 of /home/og7/public_html/sites/all/modules/contrib/spaces/spaces_og/plugins/space_og.inc).
Notice: Undefined property: stdClass::$group_access in space_og->access_feature() (line 107 of /home/og7/public_html/sites/all/modules/contrib/spaces/spaces_og/plugins/space_og.inc).
Notice: Undefined property: stdClass::$group_access in space_og->access_feature() (line 107 of /home/og7/public_html/sites/all/modules/contrib/spaces/spaces_og/plugins/space_og.inc).

#2

so any luck on this?

I`m having same issue is that a config/settings problem?

#3

Looks like you have to configure og_access.

/admin/config/group/fields -> Bundles = {select group type} -> Fields = Group Visibility -> Add Field

Then when you edit your node, select Group Visibility = Public or Private. This should be more clear, or a default option set, or some error fallback.

nobody click here