This is an error text I get on trying to edit one particular term reference field on a content type (Structure > Content types > Article > My term):

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

Saving nodes of that content type seems to reorder/drop items in the menu linked to the taxonomy and question.

Drush also threw up a virtually identical error when I tried to enable the freshly downloaded Media module, except for it was "Missing bundle property on entity of type file" (as opposed to node above).

I am tagging this as major, because it seems to interfere with a lot of important modules and makes the behaviour of the site hard to predict.

There are other reports of seemingly unrelated issues throwing up the same error message.

http://drupal.org/node/1559766
http://drupal.org/node/1565048 (Missing bundle property on entity of type taxonomy_term.)

The common factor is that it seems to be happening on update to 7.14. I was wondering if they might be related

Comments

pav’s picture

Just checked the database, the bundle property is not actually missing.

pav’s picture

This is the condition that's throwing the error: !isset($entity->{$info['entity keys']['bundle']}) (line 7538 in includes/common.inc).

Been trying to sort this out for hours. I'm way out of my depth here. Please somebody help.

Thanks.

1kubik’s picture

hey there
i get this error by using panels in combination with the module 'rooms' and media gallery:

EntityMalformedException: Missing bundle property on entity of type file. in entity_extract_ids() (line 7539 of /var/www/virtual/html/includes/common.inc).

but i do not get errors if i disable/enable media gallery (with drush)

Media Gallery
Version : 7.x-1.0-beta7

Rooms
Version : 7.x-1.0-alpha4

before EntityMalformedException the media gallery throws some Notice:

Notice: Undefined index: file in media_gallery_field_formatter_view() (line 92 of /var/www/virtual//html/sites/all/modules/media_gallery/media_gallery.fields.inc).
Notice: Trying to get property of non-object in media_gallery_field_formatter_view() (line 108 of /var/www/virtual//html/sites/all/modules/media_gallery/media_gallery.fields.inc).
Notice: Undefined index: file in media_gallery_field_formatter_view() (line 92 of /var/www/virtual//html/sites/all/modules/media_gallery/media_gallery.fields.inc).
Notice: Trying to get property of non-object in media_gallery_field_formatter_view() (line 108 of /var/www/virtual//html/sites/all/modules/media_gallery/media_gallery.fields.inc).
Notice: Undefined index: file in media_gallery_field_formatter_view() (line 92 of /var/www/virtual//html/sites/all/modules/media_gallery/media_gallery.fields.inc).
Notice: Trying to get property of non-object in media_gallery_field_formatter_view() (line 108 of /var/www/virtual//html/sites/all/modules/media_gallery/media_gallery.fields.inc).
Notice: Undefined index: file in media_gallery_field_formatter_view() (line 92 of /var/www/virtual//html/sites/all/modules/media_gallery/media_gallery.fields.inc).
Notice: Trying to get property of non-object in media_gallery_field_formatter_view() (line 108 of /var/www/virtual//html/sites/all/modules/media_gallery/media_gallery.fields.inc).
Notice: Undefined index: file in media_gallery_field_formatter_view() (line 92 of /var/www/virtual//html/sites/all/modules/media_gallery/media_gallery.fields.inc).
Notice: Trying to get property of non-object in media_gallery_field_formatter_view() (line 108 of /var/www/virtual//html/sites/all/modules/media_gallery/media_gallery.fields.inc).

marcingy’s picture

Project: Drupal core » Media Gallery
Version: 7.14 » 7.x-1.x-dev
Component: entity system » Code
Priority: Major » Normal

This is not a core bug.

pav’s picture

Status: Active » Closed (works as designed)
gittosj’s picture

Just a note for anyone searching for a solution to the same error. I had same error message but completely unrelated to Media etc. I was only hitting it when I searched (using solr) for certain terms or clicked on certain solr generated MLT links. I'd somehow scrambled the solr index between a dev and production server.

Solution - delete the solr index and reindex:

drush solr-delete-index
drush solr-mark-all
drush solr-index

gittosj’s picture

Priority: Normal » Minor
rocbrook’s picture

Got this same error after updating to D7.14. I disabled File Entity (v7.x-2.0unstable) and the problem was gone

mikemadison’s picture

Disabling File Entity (of any version) and Media do not seem to fix this problem for me. I updated from a very early version of 7.0 to 7.14 and I'm still seeing the error with virtually no modules enabled.

mikemadison’s picture

See http://drupal.org/node/1277376 for what I did to address this in core, specifically http://drupal.org/node/1277376#comment-5925664

HongPong’s picture

This may be a tangent but if you have malformed files entities - see #1446440: Unable to view me media management pages (EntityMalformedException: Missing bundle property...) for my one-off SQL fix for column type in the files_managed table.

roborracle’s picture

I can confirm that updating the file_entity module cleared this error for me.

ChrisValentine’s picture

Same here - disable File Entity and I can once again see my content. I got the error after an upgrade from Drupal 6.24 direct to 7.14