Hi, I'm trying to set up user relationships (latest dev) and have enabled the following modules

block
UR_UI
user relationships
UR-node access (and rebuilt permissions)

I then created relationship type "friend" checked settings, allowed content type "blog" to be shared with "friends" and sorted the permissions.

Then upon checking the account settings to see what shows up in edit, I get the following errors.

Notice: Undefined variable: node in _user_relationship_node_access_permission_form() (line 211 of C: snip \sites\all\modules\user_relationships\user_relationship_node_access\user_relationship_node_access.module).
Notice: Trying to get property of non-object in _user_relationship_node_access_permission_form() (line 211 of C: snip \sites\all\modules\user_relationships\user_relationship_node_access\user_relationship_node_access.module).

line 211 seems to be about organic groups but so far my OG (7x1.3) is not set up for sharing to friends, just blogs so far.

any help or advice appreciated

cheers k/g

Comments

Anonymous’s picture

subscribe...

sw3b’s picture

Same for me, have you found a solution for this ?!?

kokrull’s picture

Not so far, sorry

sw3b’s picture

I disable the feature on my side.... it's not the best solution but for now i don't have the error.

Just comment and add this line under...
// $is_group_post = module_exists('og') && og_is_group_content_type('node', $node->type);
$is_group_post = 0;

kokrull’s picture

Thanks.

mavdiablo’s picture

Hi!
I have the same problem.
But i have changed this line:
$is_group_post = module_exists('og') && og_is_group_content_type('node', $node->type);
in this way:
$is_group_post = module_exists('og') && $object_type == 'node' && og_is_group_content_type('node', $node->type);

I hope this will be useful!

Anonymous’s picture

Anonymous’s picture

Subscribe

alfredlaw’s picture

Hi
I'm new to Drupal so i really don't know where is the line that you mentioned in #6

"$is_group_post = module_exists('og') && og_is_group_content_type('node', $node->type);
in this way:
$is_group_post = module_exists('og') && $object_type == 'node' && og_is_group_content_type('node', $node->type);"

and where i can find this line to solve these error message.

Thanks and regards

Triumphent’s picture

#6 worked for me. Thanks mavdiablo. :)

Triumphent’s picture

To alfredlaw:
Download free Komodo Edit from Download.com.
open the file with Komodo ans scroll down to line number 211 and comment it out by adding two // in front of it
copy and paste fix proposed in #6 under it
save your file back into original directory
refresh your browser page, error should be gone

NenadP’s picture

Thanks! I applied code change at #6. This is major issue for me, as it seems it logs out user.
Hope it will bi fixed in next version!

petux77’s picture

Is great your work thank you

sw3b’s picture

Status: Active » Needs review

Could we have this update apply or revied by one of the maintainers ?!? #6 work for me also.

Berdir’s picture

Status: Needs review » Fixed

If you want to have stuff reviewed by the maintainer, then provide *patches* and set it to RTBC once it's confirmed to be working.

Commited.

Status: Fixed » Closed (fixed)

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