[development] nodeapi data flow

Eric-Alexander Schaefer eric.schaefer at eas-consulting.de
Mon Sep 22 17:32:59 UTC 2008

Earnie Boyd schrieb:
>> 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. ;-)
> Is it possible that the FAPI #validated is set to TRUE so that validate 
> is no longer executed?

I dug a bit deeper now. I got it all confused. The second preview works, 
but if the node was already posted and is then edited again the preview 
looses the data:
($op==validate) gets called and does what it is supposed to do. At the 
end of ($op=='view') $node->publish_on has the right content, but it 
does not show in the form. It always shows the value that was posted.

Any ideas?


More information about the development mailing list