[development] Nodeapi double tap

Ms. Nancy Wichmann nan_wich at bellsouth.net
Mon May 23 22:12:34 UTC 2011


I find that many, if not most hooks double tap. Hook_nodeapi is very consistent 
in that. However, one find some slight differences between the calls. Check to 
see if $node->build_mode is the same in each call. Also check the revision flag 
and nid.
 
Nancy
 
Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.




________________________________
From: "jeff at ayendesigns.com" <jeff at ayendesigns.com>
To: development at drupal.org
Sent: Mon, May 23, 2011 12:26:29 PM
Subject: [development] Nodeapi double tap

I'm hooking nodeapi in two companion d6 modules. One is looking for op=presave 
and modifying some of the cck field values, the other is looking for 
update/insert and sending the node information outside the site.

The problem I'm having is that the information going offsite is arriving twice, 
though with not all fields having data the first time. I find this with a dsm at 
the start of hook_nodeapi (after clicking edit on a node and then save).

LOAD
PREPARE
PRE-SAVE
PRE-SAVE
UPDATE
UPDATE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110523/20a7b622/attachment.html 


More information about the development mailing list