When an anonymous is trying to access an unpublished node like: node/234, he gets "You are not authorized to access this page." and the following messages:
Notice: Trying to get property of non-object in event_log_node_init() (line 84 of /home/openglos/evolvingmap.com/sites/all/modules/event_log/event_log_node/event_log_node.module).
Notice: Trying to get property of non-object in event_log_node_init() (line 85 of /home/openglos/evolvingmap.com/sites/all/modules/event_log/event_log_node/event_log_node.module).
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | node_error.png | 29.96 KB | star-szr |
| #3 | user_error.png | 29.92 KB | star-szr |
| #2 | interdiff.txt | 498 bytes | porchlight |
| #2 | event_log-2078319-2.patch | 2.15 KB | porchlight |
Comments
Comment #1
porchlight commentedDiscovered a similar error in the event_log_user.module when I visited user/logout. Found a fix that applies to both this issue in event_log_node.module and a similar error in the event_log_user.module. Also removed arg() functions which makes things a little cleaner.
Comment #2
porchlight commentedRemoving extra closing parenthesis.
Comment #3
star-szrPatch looks like a great improvement, using menu_get_object() is much cleaner here.
I tested with 7.x-1.1 and was able to reproduce the notices on the user and node views:
Node:

User:

With the patch applied there are no notices.
Comment #4
bvanmeurs commentedThanks guys. Committed to dev, 7.x-1.2 update coming out today.