[development] node not fully loaded in hook_view() when previewing

augustin (beginner) drupal.beginner at wechange.org
Fri Mar 27 04:58:57 UTC 2009


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?


I've searched drupal.org but didn't find anything terribly useful.

I found this old forum post:
Philosophy of 'Preview'
http://drupal.org/node/126750

And this old core issue, which I had helped reviewing at the time, but which 
is supposed to be fixed (though it was not said how it was fixed):
node previews broken by missing hook_submit
http://drupal.org/node/104047


Is this a known issue?


Blessings,


Augustin.


More information about the development mailing list