diff --git a/modules/node/node.module b/modules/node/node.module index 484c1ec..503d647 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -936,8 +936,12 @@ function node_save(&$node) { node_invoke($node, $op); node_invoke_nodeapi($node, $op); - // Update the node access table for this node. - node_access_acquire_grants($node); + // If there is a nid, update the node access table for this node. + // The reasons a nid is missing are many and hard to track, but we know for sure + // we don't want to acquire grants if its empty because then node_access gets broken. + if ($node->nid) { + node_access_acquire_grants($node); + } // Clear the page and block caches. cache_clear_all();