EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() I created a node called "Tutorial". When I preview the post before saving it, I received the following error:


  EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7693 of /var/www/clients/client1/web2/web/includes/common.inc).


However, the error when submitting a blog (a node created by drupal) is different. Here it is:


  PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1: SELECT nid FROM {node} WHERE uid = ; Array ( ) in eval() (line 10 of /var/www/clients/client1/web2/web/modules/php/php.module(80) : eval()'d code).


and


  Notice: Trying to get property of non-object in eval() (line 8 of /var/www/clients/client1/web2/web/modules/php/php.module(80) : eval()'d code).


Any help please...
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]);
}