Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7390
I started getting this error after updating to 7.8 when I try and add a node type I have called "status". Other types have no problem.
In common.inc I output the $entity object on the error page and it contains
stdClass Object
(
[field_status] => Array
(
[und] => Array
(
[0] => Array
(
[tid] => 28
)
)
)
)
The "field_status" is a "Term reference" field. I use other Term reference fields on other content types with no problem.
I have no nodes in the {nodes} database table with a blank type.
Comment | File | Size | Author |
---|---|---|---|
#73 | common.inc-1277376-73.patch | 1.67 KB | nayanalok |
#72 | common.inc-1277376-72.patch | 1.51 KB | adhariwal |
#61 | errortaxonomyterm.jpg | 409.03 KB | flock |
#61 | errorphp.jpg | 414.06 KB | flock |
#49 | common.inc_.debug_.patch | 1.22 KB | peterx |
Comments
Comment #1
markosaurus CreditAttribution: markosaurus commentedYup, exactly the same happened to me, I've been searching for an answer for weeks now without getting anywhere, this project was almost complete and then bang, this happens. I'll post back if I find anything.
BTW - this is also an issue for people with type "file" and "field" that I have see so far.
Comment #2
Canadaka CreditAttribution: Canadaka commentedI can't figure out why this happens on just this content type. I have 16 content types on my site and all the others work fine. This problem type is also the most simple with 4 fields, 3 of which are reused.
Node reference (existing)
Node reference (existing)
List (integer)
Term reference (existing)
I looking in the database at the node_type and tables for each of the fields above, there is nothing abnormal about them compared to other working content types.
I even tried deleting the "field_status" mentioned above and cleared all caches. and its still mentioned in the backtrace, even though its deleted
I even deleted all fields and I still get this error and output.
I then deleted the content type and all nodes of that type, cleared caches, checked database for any lingering data, manualy cleared cache tables, restarted web server and memcache. I then created the content type again from scratch using the same name, and I still get the error! *pulls out hair*
So I deleted that content type again and re-created using a different machine name and now there are no errors. I'm lucky in that this is a new site and I only had a few nodes created with that type. If others having this error have many nodes.. good luck!
Comment #3
Canadaka CreditAttribution: Canadaka commentedwell I feel dumb now, turns out the problem was caused by some of my custom code, I somehow deleted the $nid variable in the node_load() function, it was there before because I had tested it previously.
So @markosaurus check to make sure you don't have any custom code in your custom modules, my problem wasn't actually a drupal bug.
Comment #4
markosaurus CreditAttribution: markosaurus commentedI do have a custom module which I use to modify the contact form, but I already disabled that in-case that was the culprit.
Incidentally I also get this when I try to use access the "views" module in the admin interface...which is strange and tells me there is something else going on here.
I tried taking out all of my custom templates, turning off all custom modules, cleared cache, still no joy.
Any other ideas?
Comment #5
Dave Sandilands CreditAttribution: Dave Sandilands commentedI have this same error in Views, apart from the line no. being 7389
I created an attachment view that contains a couple of custom fields, business_name and value
This worked fine but I wanted a total for one of the fields ie value
The view is grouped on business_name.
I set aggregation to on and immediately got the error.
Now I can't edit the view at all!
Afraid I don't have any idea on what's happened much less a solution.
[Later] This doesn't appear to be a Views bug as it also appears in http://drupal.org/node/1281974
which is about field collections
Comment #6
GoldJust a little more data for those working on this;
We came across this issue by hitting admin/content and sorting on any field.
Our content consists of 2 content types. Page and redirect.
Page is out of the box + 2 term references.
redirect has the body removed, a node reference using field_redirection to present a 302 http header via the formatter.
We don't have the time to explore this but I wanted to add this info incase it helped out.
Comment #7
coderintherye CreditAttribution: coderintherye commentedHere is what changed between 7.7 and 7.8 that causes this issue. Previously, Drupal core was working around this error, now it is explicitly being told to fail when it hits this condition. However, this is not actually a bug, this is as designed, as noted in the current 7.8 release notes. Regardless of how you feel about that change, if you are experiencing this problem, it is most likely from a contrib module, most likely Media (though in my case it was wordpress_migrate). You can try disabling your enabled contributed modules one-by-one until you find which one is causing the problem then go see if that module has an update to fix the issue.
Here is what I found Angie to have said on the issue, the first is on the release page for 7.8:
as well as at http://drupal.org/node/1067750#comment-4943844
For more information see:
#1067750: Let Field API fail in a tale-telling way on invalid $entity
#1164852: Inconsistencies in field language handling
Comment #8
coderintherye CreditAttribution: coderintherye commentedAlso to note, if you do want to hack core to *temporarily* get around the issue, you should be able to remove
in most cases, and you will be back to normal, so that line in common.inc turns into
Or you could revert your common.inc to the code from 7.7.
Comment #9
markosaurus CreditAttribution: markosaurus commentedReverting common.inc back without reverting the rest of the codebase is just asking for trouble surely?
And as for removing that explicit fail check, I tried that and it didn't make any difference...hmmm.
Comment #10
coderintherye CreditAttribution: coderintherye commentedIf you look at the diff, you'll see there is no harm to reverting common.inc, you can even use the pasted code above in a patch with -R, but yes in general hacking core is the worst of all options.
On a side note, you could also try reaching into the database and doing a "SELECT * FROM node where type='';" if you have > 0 results for that query, then should fix those nodes to have a type.
The key point here is that the problem is likely arising from contrib module code and you should attempt to determine what module is the problem.
Comment #11
markosaurus CreditAttribution: markosaurus commentedOK, thanks for all the help so far, this is so frustrating to try and fix!
I've had to start and get more ruthless with it as I can't really aford this time to fix the issue (which shouldn't have arisen in the first place IMO!) and I'm sure nobody else can either.
I moved to common.inc v7.7 and now I get this;
* Notice: Trying to get property of non-object in entity_extract_ids() (line 7379 of /home/dixon/public_html/dev/includes/common.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Undefined index: field_name in field_language() (line 275 of /home/dixon/public_html/dev/modules/field/field.multilingual.inc).
* Notice: Trying to get property of non-object in entity_extract_ids() (line 7379 of /home/dixon/public_html/dev/includes/common.inc).
* Notice: Trying to get property of non-object in entity_extract_ids() (line 7379 of /home/dixon/public_html/dev/includes/common.inc).
* Notice: Undefined index: in _field_invoke_multiple() (line 299 of /home/dixon/public_html/dev/modules/field/field.attach.inc).
* Notice: Trying to get property of non-object in entity_extract_ids() (line 7379 of /home/dixon/public_html/dev/includes/common.inc).
* Notice: Undefined index: in _field_invoke_multiple() (line 299 of /home/dixon/public_html/dev/modules/field/field.attach.inc).
* Notice: Trying to get property of non-object in entity_extract_ids() (line 7379 of /home/dixon/public_html/dev/includes/common.inc).
* Notice: Trying to get property of non-object in entity_extract_ids() (line 7379 of /home/dixon/public_html/dev/includes/common.inc).
So I thought, right, I'll reinstall the media and file_entity modules and check it's not that, so I did, no help at all.
If I turn off my custom templates and modules, nothing happens either.
Next step was to take off my custom blocks....et voila. No errors.
So I know this is to do with either custom fields (input) views (process), blocks or templates (output).
A litle further diggin shoed that in views I see the same output of errors as I get on the front-end, so I know it's not the templates.
Turning off the blocks means I don't get front-end errors, but that doesn't mean anything, it just proves they aren't being outputted to screen.
So I go into views and start looking at settings, a lot of stuff seems to have changed in here since I last looked at it...in particular "aggregation settings". I don't remember those!
I start fiddling with these and when I click on "aggregation settings" I get a dropdown wih "Group by" shown, the default seems to be "value". I changed this to "entity_id" since I didn't know what it did and my errors started ot dissapear. I went through and did this for all fields and now the errors are gone.
What the hell?
I've spent weeks trying to fix this thinking it was something I'd set!
Comment #12
coderintherye CreditAttribution: coderintherye commentedWell glad to know it's fixed for you.
I wonder if there is enough here that we can move this bug to views, though we'd need to have steps to reproduce this condition.
Comment #13
valante CreditAttribution: valante commentedConfirming the Views connection.
It just started happening for me on a single Node (not a Content Type!) when I made it include a view that uses aggregation on a Term reference field.
Other nodes of the same type that have data in this term reference field, but only one term (and so no actual aggregation is needed), do not throw this exception. Nor does this particular node throw the exception if the view is not aggregated.
Tal
Comment #14
silkAdmin CreditAttribution: silkAdmin commentedI am having the same issue when programmatically loading a node_form for a custom content type.
I used the following code :
Everything worked fine until i disabled the "Rebuild the theme registry on every page load " in the Development module..
After putting it back on seems to work again.. What is going on ?
Comment #15
silkAdmin CreditAttribution: silkAdmin commentedI just tried with a freshly created content type, with no fields attached.. Same problem :(
Comment #16
dddbbb CreditAttribution: dddbbb commentedI only experience this error when I create nodes of a certain content type and only when logged in as a user with the Admin role (not just user 1). The error also shows when I try to view any of these newly created nodes but not when viewing nodes of the same content type that were created a while back (pre upgrade to 7.8).
I too have term reference fields in these problem content types but also have other content types that use term ref fields and don't throw the same error.
I've tried disabling relevant contrib modules but nothing seems to change.
Very frustrating. What's going on here folks?
Comment #17
coderintherye CreditAttribution: coderintherye commentedTo re-iterate, this is an error thrown due to a bug in contributed modules, though one that only came about because of a change in the Drupal's API with the 7.8 release.
To fix it, you really need to narrow down which module is causing the issue. This could be Views, Term Reference, etc.
If you were feeling snappy you could try unit tests to track down the problem, but for most people the easiest way to track it down will be by disabling contributed modules.
Try going to your module page, turning off 1 contributed module that you suspect may be the problem (e.g., Term Reference), then visit the page that was throwing the errors again. If that page no longer throws errors then bingo you now the module that was causing the problem and can go file a ticket in that module's issue queue (or see if one exists there for this problem already).
Comment #18
markosaurus CreditAttribution: markosaurus commentedAnyone get any further with this...I'd love to know if this was a views bug! It's a module I use in every build, so squashing it would be top-priority for me and I'll gladly commit time to it to help in any way I can.
Post some info people!
Comment #19
dddbbb CreditAttribution: dddbbb commentedStill no joy in tracking down what's causing it at my end. Troubleshooting has been made even harder by not being able to disable modules that create new fields (without deleteing whole lumps of content - not practical).
I can rule out Workbench Moderation, OG and Content Access.
Comment #20
mototribe CreditAttribution: mototribe commentedI ran into the "EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7389 of .../includes/common.inc)." error and I could reconstruct the steps:
- pretty new D7.8 install (Pantheon), added views, ctools, admin menu
- added topic taxonomy with a term reference to a TopicGroup taxonomy
- added a few nodes that have "topics" selected
- created view for type taxonomy/topics
- added relationship "content using topics"
- added nid and "comment count" fields
- enabled aggregate settings "group by"
- changed "nid" and "comment count" to use "count distinct"
- added field "taxonomy terms using TopicGroup"
- now I have an option for "group column": Tid is selected, when I apply and continue I get error
- when I recreate all the steps and select "entity_id" then the view works without errors.
Comment #21
patoshi CreditAttribution: patoshi commentedsubscribe ... same problem -- screenshot: http://prntscr.com/3ay8k
EntityMalformedException: Missing bundle property on entity of type file. in entity_extract_ids() (line 7389 of /home/xxxx/public_html/dev/includes/common.inc).
The website encountered an unexpected error. Please try again later.
i turned off media module and my site started working again... i got that error on the frontpage which was basically a list of blog posts.
Comment #22
rkeppner CreditAttribution: rkeppner commentedFor those running into this problem when using aggregation in Views, there is a ticket open at http://drupal.org/node/1277296. However, I haven't yet managed to parse the described workaround, other than updated to the dev version.
Comment #23
wjaspers CreditAttribution: wjaspers commentedis there a reason this is marked as "closed"?
AFAIK, this problem still exists....
Comment #24
dddbbb CreditAttribution: dddbbb commentedIs it closed because it's not a core issue but a (very difficult to determine) contrib module issue?
Comment #25
coderintherye CreditAttribution: coderintherye commentedYes, this is not an issue with Drupal core, the error exists in a contributed module, and this error message is simply indicating that to you (perhaps not in the best way, but it is nevertheless). If you are experiencing the issue follow the instructions I gave earlier in the thread and then go look in the issue queue of the module giving you the problem or please see the linked to issues in this thread or file your own issue in the respective issue queue of the module giving you problems.
Comment #26
FreeFox CreditAttribution: FreeFox commentedI had the same error but it was due to a typo. I loaded a node in PHP, change a field and than save it back.
$ndoe = node_load($nid);
$node->field_data = 'new data';
node_save($node);
But because of the typo, there was no node to save.
Hope this helps someone.
Comment #27
mgiffordI started getting this error after upgrading the Token module. Sadly reverting it didn't resolve the problems.
There didn't seem to be any database updates, so really not sure what could have happened...
EDIT: Applied this patch to core and it went away - http://drupal.org/node/1067750#comment-4941822
So I guess I should really track down where $entity->{$info['entity keys']['bundle']} === '' so that I can figure out which module was triggering this critical failure!
Comment #28
CraigSander CreditAttribution: CraigSander commentedDefinitely having the same issue and thinking it's Views-related.
Comment #29
BootstrapJohnny CreditAttribution: BootstrapJohnny commentedMy error of this type is being thrown by the Entity Reference contrib module. Basically, if I use the autocomplete widget, the AJAX is giving me this error. If I switch to the Dropdown widget, there are no errors, which makes it appear that the error is in the AJAX for the autocomplete for the Entity Reference.
Notably, I get no errors on the same widget in the Location module, so it's not a global thing, but I think just specific to the module that is using the autocomplete widget?
I hope this helps someone. I'm off to open an issue on the Entity Reference module.
Comment #30
dams_26 CreditAttribution: dams_26 commentedI've got the same error when I tried to create a new view (a term count view) and used the aggregation feature on my term field (I'm using autocomplete widget too).
Comment #31
killtheliterate CreditAttribution: killtheliterate commentedI've encountered this problem as well, and I don't see how this could be a contrib module issue, but rather one or more modules made core in d7.
I've used the below code to print node content somewhere besides the content area. In this instance, I'm printing a picture in the sidebar.
The only modules I've used are fields and image styles. I've dropped this code into a php block which I've put in the sidebar of my site. If I navigate to a page that doesn't have the 'field_image_aside', for instance, /user, I get the above error. I then have to disable my block via phpmyadmin, as I've only seen this so far while logged out.
This problem only occurs on pages where the region the block is being printed in exists.
Comment #32
killtheliterate CreditAttribution: killtheliterate commentedI fixed my issue by changing the above code to:
I needed to check if arg(0) == 'node'. Not sure why this would blow up so hard, though, if that check is skipped.
I guess the discussion about stricter error handling explains why this went from working to not.
Comment #33
Alex Andrascu CreditAttribution: Alex Andrascu commentedI think #1268378: Empty file type causes exceptions in Drupal 7.8 is related.
Comment #34
ndeschildre CreditAttribution: ndeschildre commentedThe error message is confusing, but what it means is basically:
"The entity you gave me is invalid, it does not have a bundle attribut."
or, translated in the context of node entities,
"The node you gave me is invalid, it does not have a "type" attribute."
Just print_r($entity); before the exception being thrown, and you'll probably easily see why your entity is crap.
As such, this "bug" is only the symptoms of many many various bugs.
Comment #35
wxman CreditAttribution: wxman commented@ndeschildre
I did as you suggested as I was getting the same sort of errors after my upgrade. It keeps telling me it's a png attached to one of my news nodes. I tried editing the common.inc file as suggested in http://drupal.org/node/1266620#comment-4974982, and I was able to open the news file, edit, and save it. Once I removed the common.inc fix, the error came back. I guess I don't understand why the system can't figure out what to do with the png.
I have made it work without the common.inc hack. The only way I've found so far is open each file that has an attached picture, delete the picture, save, then edit it again adding the picture back in.
Comment #36
boran CreditAttribution: boran commentedFor me this error happens when trying to editing certain fields imported from D6.
The fix was if ($entity_type=='node') , set $bundle = $entity_type;
patch attached.
This at least allows the field to be edited and the website does not crash.
Comment #37
boran CreditAttribution: boran commentedComment #38
tim.plunkettThat's not what patch to be ported means. If anything, you would need to open an 8.x issue first.
Setting status back.
Comment #39
BeaPower CreditAttribution: BeaPower commentedanyone have a fix? I am having this issue...
Comment #40
mikemadison CreditAttribution: mikemadison commentedI think this may be an issue when upgrading from a particularly old version of Drupal to a new version. I just upgraded from 7.0 to 7.14, and I ran into this. There are some related issues with this error for specific modules (http://drupal.org/node/1565346 for Media Gallery and http://drupal.org/node/1576664 for Entity Reference).
The patch in #36 did fix this issue in my circumstance. Note that I did try some of the suggestions in the issues I've linked, but honestly, disabling every module on the site didn't the fix the problem for me. Hence my assumption that this could be an issue of upgrading content from older versions of D7.
Comment #41
peterx CreditAttribution: peterx commentedFor anyone diagnosing this error, I changed the message to the following. In the case I am researching, $entity is null.
throw new EntityMalformedException(t('Missing bundle property on entity of type @entity_type, property @property, in entity @x.', array('@entity_type' => $entity_type, '@property' => $info['entity keys']['bundle'], '@x' => serialize($entity))));
#36 did not fix the problem I am investigating. It was after an upgrade from 7.9 to 7.14. None of the listed "problem" modules are used on the site.
Comment #42
GN CreditAttribution: GN commentedI had this problem with some nodes, too, and patch #36 did not help me.
I fixed it by deleting from the `comment` table in the database some records related to deleted old comments (SELECT * FROM `comment` WHERE `status` =0) - they somehow caused 'EntityMalformedException' errors for nodes having no valid comments, only deleted ones.
Comment #43
Anonymous (not verified) CreditAttribution: Anonymous commentedpatch #36 don't fix the issue.
It seems coming from video modulo upgrade from d6 to d7.
Comment #44
boran CreditAttribution: boran commentedMarking active again since several people have an issue still
Comment #45
drupalninja99 CreditAttribution: drupalninja99 commentedI am getting this from the acquia search results after a d6 to d7 upgrade
Comment #46
Preston McMurry CreditAttribution: Preston McMurry commentedTrying to execute a field-only save, as outlined here: http://blog.urbaninsight.com/2011/10/24/saving-nodes-fields-without-savi...
Throwing same error: "EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7539 of /var/www-virtual/strategicvideoawards.com/htdocs/includes/common.inc)."
My code:
As soon as the call to field_attach_update() is attempted, it blows chow. (If I sprinkle dpm() debug statements before and after, the after is never rendered.)
If I change the 'node' to some random string like 'whygodmustIsuffer', then field_attach_update() throws no errors, but ironically neither does it successfully perform the update.
-----
p.s. Drupal 7.14. New install, not an upgrade. When I changed the error message as outlined in #41, I got this:
-----
edit: field_attach_presave() also blows ass.
edit: If I pass $node directly to field_attach_update(), rather than via the temporary object, it proceeds without throwing the cited error. However, it does not actually perform the update (i.e. the same misbehavior as when I changed node_type to 'whyGodmustIsuffer') ...
Comment #47
xjmWhen you encounter these issues, look for or file an issue with the module that is causing the exception. Drupal core is returning a legitimate error message about bad data is being passed, so it needs to be fixed in the module passing that data.
Comment #48
peterx CreditAttribution: peterx commented@xjm, one of the problems with Drupal is finding "the module passing that data". I usually have to expand the error messages to list the data. If the data is empty or generic, it still does not point back to anything definitive. Adding a backtrace helps. Drupal could do with a help page on how to mode core with full diagnostics to pin down the source of the data.
Perhaps the error message could be expanded to include the bundle property and entity id.
Comment #49
peterx CreditAttribution: peterx commentedHere is a patch to help people debug. My most recent need for this was caused by an out of date Field permissions module. There were several previous uses for other problems.
Comment #50
mgifford#49 has a bunch of notice errors and the core patch really doesn't produce something that is easy to track down to the Module.
I'm using Field Permissions 7.x-1.0-beta2, so there must be a conflict somewhere else, but the object is messy when it gets to Watchdog.
Comment #51
albertski CreditAttribution: albertski commented#49 - Updated the Field Permission Module (last updated on June 25, 2012) and my Problem went away! :)
Comment #52
mgifford@albertski this module here wasn't updated on June 25th:
http://drupal.org/project/field_permissions/
Please give me some more details.
Comment #53
HongPong CreditAttribution: HongPong commentedThis 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.
Comment #54
albertski CreditAttribution: albertski commentedSorry it was updated Jan 25th. I guess I had an older version that one. When I updated it, the problem went away.
Comment #55
albertski CreditAttribution: albertski commentedI experienced this error again on some articles and I figured out Why I get the error. These are the steps to reproduce this error.
My article content type has a "company" node reference auto complete field.
Not sure if this is what causing everyone's problem but I am seeing that if you delete a node that is referenced in another node by node reference, it does not delete that referenced node from the node.
Comment #56
albertski CreditAttribution: albertski commented#55 - The Reference Delete Module will prevent this issue to happen in the future but won't fix the issue if you already have this issue. In my case I deleted a couple company nodes that were causing this issue only on my dev instance. :)
Comment #57
a6hiji7 CreditAttribution: a6hiji7 commentedI am facing this issue. What is happening is that whenever a taxonomy term is deleted, every node that referred to that term throws this error. I have checked with a basic Drupal installation and the issue was not there; I was able to delete terms without causing any issue with nodes that referred to them. In the site where I am having the issue, I checked the database and see that the table corresponding to the term reference field still has the reference records. Deleting the records from the table actually solves the issue. However I have not been able to find which module is causing the records to be not deleted.
Comment #58
RowboTony CreditAttribution: RowboTony commenteda6hiji7, the module which seems to cause this for me is Drupal Commerce. I have product attributes which are in fact taxonomy terms, this seems to be what is causing my
EntityMalformedException
error :(Comment #59
nicodv CreditAttribution: nicodv commentedIn fact, I have the same error. What i did:
Create a new node using a different user than admin
Delete it
Now admin can create new nodes of that content type but the other user can't and throws the error.
The node had 2 entity ref fields, but in the db I can't see anything I can delete.
What should I look at? the entity ref fields tables in the db? and what trace should I see that tells me that the deleted node left a reference pointing at it?
thanks
Comment #60
a6hiji7 CreditAttribution: a6hiji7 commentedFor me the field was named "field_shared_topic" and the table that had references to missing terms was "field_data_field_shared_topic". I installed the "Field reference delete" module (http://drupal.org/sandbox/drothstein/1775816) and that seems to have fixed the issue.
Comment #61
flock CreditAttribution: flock commentedDrupal Core 7.16
I agree with this. I deleted 2 taxonomy terms and my blog view stopped working:
Error
The website encountered an unexpected error. Please try again later.
When I got into views, and views attempted to load the preview:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /2012/admin/structure/views/view/news/preview/page/ajax
StatusText: error
ResponseText: EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7562 of /home/content/b/1/9/b19842723/html/2012/includes/common.inc).
Went into the Reports are and found two terms missing, attaching the JPGs for reference. Today I will try to get into the database and delete those reference records even though i'm a newb at SQL.
--------solved---------
Intalled: http://drupal.org/project/taxonomy_orphanage
Ran it through the admin pages and it solved my troubles.
Comment #62
cbrasfield CreditAttribution: cbrasfield commentedrm
Comment #63
kclarkson CreditAttribution: kclarkson commented@Flock !!!
Thank you so much !!! You just saved my day !!!!
taxonomy_orphanage worked !
Comment #64
kacash CreditAttribution: kacash commentedIn my case the error was triggered by PHP code I'd written into a custom block. The tip-off that it was in a block was that the error disappeared when using other themes.
Basically I was trying to retrieve CCK fields from a node which didn't always exist. The fix was to add a constraint for if($node != false)
Comment #65
kenorb CreditAttribution: kenorb commented#1281114: Database records not deleted for Term Reference Fields after Term is Deleted
#1778572-24: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7562
Comment #66
markosaurus CreditAttribution: markosaurus commentedHow did we ever get into a position where these were not rmeoved I wonder? That is somewhat ponderous.
Does not matter so much I would think now that it is being addressed. I've used Drupal for years and seen this error many times without knowing that fix existed, so thanks for that @flock.
Anyone know if this is being fixed in D8 core? Has it ben raised?
Comment #67
kenorb CreditAttribution: kenorb commented@markosaurus: Yes, it's raised in 8.x as mentioned in #65
See: #1281114: Database records not deleted for Term Reference Fields after Term is Deleted
Comment #68
Summit CreditAttribution: Summit commentedHi,
#36 fixed it for me temporarely , thanks!
Greetings, Martijn
Comment #69
jm_drupal CreditAttribution: jm_drupal commentedHi, I was getting "EntityMalformedException" error when i try to access any views 'page display' only. "Views block display" was working ok. This Patch in #3 fixes my problem. Thanks.
Comment #70
jfcolomer CreditAttribution: jfcolomer commentedForcing to reload the node, worked for me:
$mynode = node_load($node->nid, NULL, true);
However I need to find out why it did not find my node bundle therefore is not able to fetch the node from cache.
Regards,
Juan
Comment #71
ehsankhfr CreditAttribution: ehsankhfr commentedMost of the times its because of your unmanaged coding. For example having different validation functions for one form in different modules, and one of them faces with problem in using entities!
So Most of the times Drupal is innocent!
Comment #72
adhariwal CreditAttribution: adhariwal at Axelerant for Acquia commented#36 Fixes the issue for node entity this has to be done for taxonomy_terms too. The update patch file is attached.
Comment #73
nayanalok CreditAttribution: nayanalok commentedNeed to add else condition if entity property is not set. Here is the updated patch on top of #72
Comment #74
bobburns CreditAttribution: bobburns commentedstill there as of 7.66 - needs to get committed to core
Comment #75
apadernoComment #76
apaderno