How to get field values of a just created (or not yet) node? I am calling node_load() function in a custom module and it returns only part of the variables like title, uid, vid, status (all the meta), but it never returns actual field contents. I tried node_page_view(), tried menu_get_object() - all in vain, no field values.

What am I doing wrong? Is this because maybe my module is calling node_load() too early before the saving node, but then how it has already $node-&gt;title, $node-&gt;nid and other values? If they are some kind of prepared values, then how can I get the same prepared value for a custom field?

And here is the code from the Community documentation page Sending Notification Messages that I am using in my module:

/*
 * Implements hook_node_insert().
 */
function foo_node_insert($node) {

  $message = message_create('foo_message_type', array('uid' =&gt; $node-&gt;uid));

  $wrapper = entity_metadata_wrapper('message', $message);
  $wrapper-&gt;field_node_ref-&gt;set($node);

  $options = array(
     'rendered fields' =&gt; array(
       'message_notify_email_subject' =&gt; 'field_rendered_subject',
       'message_notify_email_body' =&gt; 'field_rendered_body',
     ),
  );

  message_notify_send_message($message, $options);
}


and it works just fine for the message subject, however for some reason I can't get node body to be mailed properly. 

I tried to see the content of the $node variable in the following code from example module: 

elseif (isset($message['params']['message_entity']-&gt;field_node_ref)) {
    // This is a node.
    $nid = $message['params']['message_entity']-&gt;field_node_ref[LANGUAGE_NONE][0]['target_id'];
    $node = node_load($nid);
    $messageid_params['uid'] = $node-&gt;uid;
    $messageid_params['nid'] = $node-&gt;nid;
    $messageid_params['cid'] = 0;
    $messageid_params['time'] = $node-&gt;created;
    if (variable_get('mailcomment_alter_subjects', 1)) {
      $subject = $message['subject'];
      $subject = variable_get('site_name', '') ? '[' . variable_get('site_name', '') . '] ' . $node-&gt;title : $subject;
      $message['subject'] = $subject;
    }
    dpm($node);
   }


and unfortunately my custom node field always returns empty:

field_description (Array, 0 elements)
$...-&gt;field_description
All that I needed to do was using

$node = node_load($nid, null, true);


instead of just 

$node = node_load($nid);


and now the node is loading as expected.