EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids()
I had similar issue. In my case I was using following line in node.tpl

$field = field_get_items('node', $node, 'field_foo');
$sponsored = field_view_value('node', $node, 'field_foo', $field[0]);


And field_foo was not in all content type.
In Drupal 6 or 5 approach was different to get field values. That's why it was not happening.

Solution was:

if($node-&gt;type=='story'){
 $field = field_get_items('node', $node, 'field_foo');
 $sponsored = field_view_value('node', $node, 'field_foo', $field[0]);
}