I have written a custom module that creates certain nodes in bulk based on certain node types and other conditions. After installing revisioning, I get these messages when I run my bulk create operation. I've traced my code, and the problem seems to occur during node_save(), which is being performed on nodes selected with node_load() and a SQL query.
Notice: Undefined property: stdClass::$nid in revisioning_set_node_revision_info() (line 41 of ... revisioning_api.inc).
Notice: Undefined property: stdClass::$nid in revisioning_set_node_revision_info() (line 42 of ... revisioning_api.inc).
Notice: Undefined property: stdClass::$vid in revisioning_revision_is_current() (line 112 of ... revisioning_api.inc).
Notice: Undefined property: stdClass::$vid in _revisioning_node_is_pending() (line 159 of ... revisioning_api.inc).
Comments
Comment #1
rdeboerFixed and released as part of 7.x-1.0-beta5.
Comment #2
chrisgross commentedI've updated to beta5 and I am still seeing these errors. I also was/am seeing this one, too.
Notice: Undefined property: stdClass::$nid in revisioning_node_presave() (line 448
Comment #3
chrisgross commentedAlso, since this update, the edit tab for editing a node, now says "Revisions". So there are two revisions tabs.
EDIT: *This* issue mysteriously vanished after enough cache clears, but the main problem related to this ticket still exists.
Comment #4
rdeboerOk will look into it. Thanks for reporting it.
Comment #6
chrisgross commentedI am seeing these errors again. It looks like during node_presave, the revisioning_set_node_revision_info() function is being called, which is relying on an nid that doesn't exist.
Notice: Undefined property: stdClass::$nid in revisioning_set_node_revision_info() (line 41 of /local/www/vhosts/www_gps/sites/all/modules/revisioning/revisioning_api.inc).
Notice: Undefined property: stdClass::$nid in revisioning_set_node_revision_info() (line 42 of /local/www/vhosts/www_gps/sites/all/modules/revisioning/revisioning_api.inc).
Notice: Undefined property: stdClass::$nid in revisioning_set_node_revision_info() (line 41 of /local/www/vhosts/www_gps/sites/all/modules/revisioning/revisioning_api.inc).
Notice: Undefined property: stdClass::$nid in revisioning_set_node_revision_info() (line 42 of /local/www/vhosts/www_gps/sites/all/modules/revisioning/revisioning_api.inc).
Status message
Initial revision created and published.
Initial revision created and published.
If everything is still going to function normally regardless of these notices, just suppressing those messages when there is no nid would be nice.
Comment #7
chrisgross commentedComment #8
rdeboerAbsolutely. This should be an easy one.
Comment #9
rdeboerFixed in 7.x-1.0-beta8
Comment #10
chrisgross commentedThis seems to work just fine. Is there any way I can get this update outside of beta8? beta7 works great with my custom tweaks in place for issue http://drupal.org/node/1174846, but beta8 hosed everything up. I would like to get this particular fix in place on my site and then move on.
Thanks.
Comment #11
rdeboerYep, the fix is in file revisioning_api.inc, lines 37, 38 should look like this:
Comment #12
chrisgross commentedThanks!
I will make the change manually and if you end up getting the other issue working smoothly, I will obviously have no problem overwriting it.