Index: modules/node/node.module =================================================================== RCS file: /cvs/drupal/drupal/modules/node/node.module,v retrieving revision 1.947.2.24 diff -u -p -r1.947.2.24 node.module --- modules/node/node.module 2 Jun 2010 12:11:07 -0000 1.947.2.24 +++ modules/node/node.module 3 Sep 2010 18:44:12 -0000 @@ -931,8 +931,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();