27 Mar
2009
27 Mar
'09
8:46 a.m.
On Friday 27 March 2009, augustin (beginner) wrote:
Hello,
In a module with its own node type, the node is not fully loaded when using preview.
In hook_load(), I return my own extra fields to the node: return array('mynodetype' => $extra);
In hook_view(), $node->mynodetype is set when viewing the node, but not when editing then previewing the same node. Isn't the node loaded as for a normal node view?
No, because it might not even exist yet in the database ("create content"). However, submitted values as in $form_state['values'] will be merged into the node object on preview and save, so you might e.g. add more node properties in hook_nodeapi($op='validate'), or stuff. Cheers, j