I'm doing a drupal 7 website, I've now started to experience a "EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7820 of C:\xampp----\includes\common.inc)." error whn I try to view a node in full view mode and only if I'm logged in as administrator.

This is happening here:

if (!empty($info['entity keys']['bundle'])) {
// Explicitly fail for malformed entities missing the bundle property.
if (!isset($entity->{$info['entity keys']['bundle']}) || $entity->{$info['entity keys']['bundle']} === '') {
  throw new EntityMalformedException(t('Missing bundle property on entity of type @entity_type.', array('@entity_type' => $entity_type)));

I found some pages about this error but none seems to apply to my case. I put a var_dump just before the instruction throwing the exception and all I get is bool(false). I've checked all the bool fields of the node and they all have #bundle correctly set.

I think the problem might have started after installing the database optimization module. I found some information regardin this error and clearing the form_cache but I didn't understand if this can apply to my case.

I guess these hints are enough to trace the problem for a drupal expert, unfortunately not for me.

Any suggestion? Thanks

  • Can you post the var_dump or dpm() output the node object? It should contain the $node->type property.
    – AKS
    May 9 '15 at 22:05
  • var_dump($entity) returns just (bool)false. I checked also the node with devel and the type property is correctly set to 'my_job_type'
    – oppure
    May 9 '15 at 22:19
  • I've tried solutions proposed in other pages like installing and running the taxonomy orphanage module, or running queries to find orphaned nodes but I didn't find anything so far.
    – oppure
    May 10 '15 at 9:56
  • The issue should be that there is no node object at all rather than the $node->type field in particular is missing.
    – AKS
    May 10 '15 at 10:02
  • I have only one node of this type. I can view it as anonymous or logged in user, I get the error only when I try to view it as administrator. I'm trying to disable the radioactivity module but drupal doesn't let me do it. it says there a re still fields in use, which is not true, I've deleted all nodes and removed the field from content type. May me this is anothr hint.
    – oppure
    May 10 '15 at 10:51

It was this: https://www.drupal.org/node/1888610 . . . . . . . . . . . . . . . .

Not the answer you're looking for? Browse other questions tagged or ask your own question.