Each time I save a node I get three E_NOTICE errors in my development environment.

Please see attach to fix the problem.

If those variables are supposed to exist, then there is another problem!

Thank you.
Alexis Wilke

Comments

deekayen’s picture

Status: Needs review » Needs work

I haven't run the patch, but I'm pretty sure those need to actually be integers returned, not booleans.

AlexisWilke’s picture

StatusFileSize
new874 bytes

It's the same thing in PHP... FALSE = 0 and TRUE = 1

But that way the 'view' will be fixed too. 8-)

There is the original:

  $user_view_perm = (($user_edit_perm || $user_delete_perm) ? 1 : $node->node_privacy_byrole['author']['view']);

Thank you.
Alexis

AlexisWilke’s picture

Status: Needs work » Needs review
deekayen’s picture

Status: Needs review » Fixed

I applied this to DRUPAL-6--1. When I went to apply it to HEAD, that was the identical code, minus a difference of extra parenthesis.

Status: Fixed » Closed (fixed)

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

lars toomre’s picture

I just stumbled across this issue this weekend running version 6.x-1.5 and was glad to see that that a solution already was present in the head version of the module. Two questions...

1) When will the head version be rolled out as a new stable version? We generally are loathe to depend on development versions for such a key module as setting node access permissions. Instead of relying on development code, we have manually patched our local version for this issue.

2) As we were working through this issue, we are now wondering whether the $node->node_privacy_byrole['author'] is used. Certainly for nodes that a user has created and hence can view and delete, there is no ['author'] array in our debugging reports. Hence, it appears that the first $grants record for realm 'node_privacy_byrole_user' will always return FALSE values for the view, edit and delete permissions. Is this really the way the code was meant to be written (even though then then appears to be super ceded by the 'node_privacy_byrole_role' role records that follow)?

Cheers!!