Warning/Error message when saving new content: undefined property stdClass::$current_revision_id

Created on 3 May 2016, about 9 years ago
Updated 21 May 2025, about 2 months ago

When saving/adding new content, I receive the following error message:

Notice: Undefined property: stdClass::$current_revision_id in revisioning_events_argument_current_revision() (line 114 of [...]/drupal/sites/all/modules/revisioning/revisioning.rules.inc).

The code at this location is the following:

[...]
107 function revisioning_events_argument_current_revision($arguments, $name, $info) {
108   if (empty($arguments['node'])) {
109     drupal_set_message(t('Revisioning: could not evaluate rule condition -- node variable missing.'), 'warning');
110     return FALSE;
111   }
112   $node = $arguments['node'];
113   // Use revisioning_get_current_node_revision_id($node->nid); ?
114   $current_vid = $node->current_revision_id;
115   if ($node->vid != $current_vid) {
116     $current = node_load($node->nid, $current_vid);
117    return $current;
118   }
119   return $node;
120 }
[...]

When replacing the code in line 114 with the content from the comment above, the error message is gone at it seems to work:

[...]
114   $current_vid = revisioning_get_current_node_revision_id($node->nid);
[...]

The attached patch contains this fix.

🐛 Bug report
Status

Active

Version

1.9

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024