Closed (cannot reproduce)
Project:
Heartbeat
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Apr 2012 at 19:20 UTC
Updated:
20 May 2012 at 19:39 UTC
Here is the block of code that was causing issues:
// Prepare extra variables (hardcoded for node for now)
// TODO think of a cleaner sollution.
if ($this->nid > 0 && $node = node_load($this->nid)) {
$this->variables['node_type'] = $node->type;
$this->variables['node_status'] = $node->status;
$this->variables['node_uid'] = $node->uid;
}
if ($this->nid_target > 0 && $node = node_load($this->nid_target)) {
$this->variables['node_target_type'] = $node->type;
$this->variables['node_target_status'] = $node->status;
$this->variables['node_target_uid'] = $node->uid;
}
This block of code is related to Organic Groups because when the nid or nid_target is 0, it stored these vars. Although I cannot recall the specific instance where this gave me issues, I seem to remember it incorrectly stored values in the HB records that didn't belong there, and possibly throwing errors. I ended up commenting these lines out after coding a work-around for OG context with heartbeat (see issue 1555006).
thanks for looking into this
Comments
Comment #1
Stalski commentedThis works fine as it should. This code is only used to check access with the node_access function. I can't imagine it would break anything.