[development] nodeapi data flow

Eric-Alexander Schaefer eric.schaefer at eas-consulting.de
Sun Sep 7 19:06:06 UTC 2008


FGM schrieb:
> Maybe you are looking for something like http://drupal.org/node/112180 ?

No. I want to know with which $op's hook_nodeapi() is called and the 
state of the node data during the call.
E.g.: When the user clicks "preview", hook_nodeapi() is called with 
$op='validate'. $node contains all the fields from the form in 
unprocessed state.

I am trying to fix a bug in scheduler.module. The user enters a time and 
date for a node to be published automatically (like "2008-09-10 
10:00:00). On $op=='validate' the entered string is converted to a 
timestamp if $node->publish_on is nonnumeric (eg a string). The same is 
done on $op=='presave'. Works like a charm, except if the user clicks 
"preview" a second time. I don't know why. The form processing should be 
the same as for the first preview.
Maybe I need to dig into node.module and find out which functions are 
called and which how the node data is processed. Sleep is overrated 
anyway. ;-)

Thanks,
Eric


More information about the development mailing list