[drupal-devel] [bug] Make node_save() recursion-aware

Dries drupal-devel at drupal.org
Tue Jul 19 18:36:28 UTC 2005


Issue status update for 
http://drupal.org/node/27007
Post a follow up: 
http://drupal.org/project/comments/add/27007

 Project:      Drupal
 Version:      cvs
 Component:    node system
 Category:     bug reports
 Priority:     normal
 Assigned to:  jvandyk
 Reported by:  jvandyk
 Updated by:   Dries
 Status:       patch

I don't like this patch.  It's a hairy fix.  There must be a better way
to avoid recursion in first place.




Dries



Previous comments:
------------------------------------------------------------------------

Tue, 19 Jul 2005 02:14:16 +0000 : jvandyk

Attachment: http://drupal.org/files/issues/node_serialized2x.patch (664 bytes)

node_save() saves a node, then calls insert or update hooks. These hooks
may run functions that, in turn, call node_save().


This all works fine except that if a revision is being created, the
revision gets serialized twice -- once on the original node_save() call
and once on the callback's node_save() call.


The attached two-line patch simply inserts a boolean variable called
rev_serialized to keep track of whether the serialization has already
been done.


I'd like to see cvs and 4.6 patched.


This patch is necessary so I can release actions and workflow for 4.6.


Background: http://drupal.org/node/24326







More information about the drupal-devel mailing list