Difference between hook_node_view() and template_preprocess_node() with seeing messages When I add a form to a node's render tree using hook_node_view(), eg

&lt;?php

/**
* Implements hook_node_view().
*/
function MODULE_node_view($node, $view_mode, $langcode){
  if ($node-&gt;nid == 9 &amp;&amp; module_exists('contact')) {
    module_load_include('inc', 'contact', 'contact.pages');
    $cForm = drupal_get_form('contact_site_form');
    //$cForm['#action'] .= '?destination=' .    request_path();
    $node-&gt;content['contact_form'] = array(
    '#markup' =&gt; drupal_render($cForm),
    '#weight' =&gt; 20,
    );
  }
}


then I get my messages displayed right after the submission.

I do the same thing with template_preprocess_node(), the messages are displayed one request after the submission.

I suspect this is related to the execution order.  Can someone shed some light on the difference here?
It is the execution order. hook_node_view() acts on the node object as it is being assembled. When template_preprocess_node() is called, the node is ready to be rendered. For instance you may use template_preprocess_node() to change the date format.