Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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.