Adding Node to Entity Reference List (Via Rules) Throws EntityMalformedException I'm using rules and I'm trying to add a reference to an updated node to an entity reference on another node. I am getting the following exception.

EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7633 of /var/www/html/mysite/includes/common.inc).

I found another post that states - "EntityMalformedException: Missing bundle property on entity of type node." means that Drupal does not recognize your entity as a valid one. In the entity info listing, there is a mapping from "bundle" to "type", for nodes.

Either your $node doesn't have a ->type, or Drupal no longer has the type registered. The type could have been removed, either from the UI, or by disabling a feature, and possibly in more interesting ways as well.

My question is - How can I go about debugging this and correcting the problem. I have Devel installed and I have debugged issues before I just need a little guidance to help me get to the bottom of this / or post the issue to whatever module has caused the error so the maintainers know about it.

Thanks very much and have a great day!
Okay I've fixed the error and whilst I'm not 100% sure this was the issue I think it had to do with the fact that the new node had not been saved prior to my attempting to assign it to the other node. Hence it had no node id, hence the error - I think.