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.
When trying to edit a term reference field on my content type "manage fields" page I get the following error:
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7562 of /home/mydrupal/public_html/includes/common.inc)
What is causing this error???
Comments
Comment #1
Back From 7 CreditAttribution: Back From 7 commentedFound the issue. The field permissions module was somehow throwing the error. I removed the field permissions module and fixed the issue...
Comment #2
stugacz CreditAttribution: stugacz commentedIf field permissions module is not installed would there be also be some other cause and solution?
Comment #3
RYL CreditAttribution: RYL commentedHi,
Same comment as above.
Field permission is not installed on my D7 site.
Comment #4
Back From 7 CreditAttribution: Back From 7 commentedTry to delete the field and redo it! This all happened when we edited taxonomy vocabulary name. Try to create a fresh term reference field on your content type.
Comment #5
adroid CreditAttribution: adroid commentedHi!
Same error but I get it each time when cron runs.
Cron should create new nodes of type "feed_item" by importing RSS feeds(Feeds).
But "feed_item" content type doesn't have any taxonomy term reference fields - so might it be deeper issue?
Comment #6
mgiffordWe got this from version 7.x-1.0-rc3+10-dev (2012-Sep-06) but think that should have stuff missing from 7.x-1.0-rc3 (2012-May-25).
Not familiar enough with entities to dig much further into this but:
http://api.drupal.org/api/drupal/includes!common.inc/function/entity_ext...
The line is:
throw new EntityMalformedException(t('Missing bundle property on entity of type @entity_type.', array('@entity_type' => $entity_type)));
Some related modules we've got enabled:
Entity Reference 7.x-1.0-rc3
Entity Translation 7.x-1.0-alpha2
File entity 7.x-2.x-dev
Hierarchical Select Entity Reference 7.x-1.x-dev
Comment #7
xaa CreditAttribution: xaa commentedhi, I've the same error after have deleted a term. All nodes or pages (as taxonomy pages) that was refering to the term deleted don't work and display the error message.
Comment #8
xaa CreditAttribution: xaa commented#4 works but don't fix the problem :)
Comment #9
marcoBauli CreditAttribution: marcoBauli commentedSame error, but removing the two Term reference fields didn't help..... Field permission not installed..
EDIT: the error was caused by the Dragndrop_uploads module. Disabling it made things work fine again!
Comment #10
kclarkson CreditAttribution: kclarkson commented@marcoBauli
How did you debug to find the module that was causing the error ?
Comment #11
marcoBauli CreditAttribution: marcoBauli commentedwell not really debugged, just used dichotomic method: disabled modules till i found the culprit.
Comment #12
Tokoh CreditAttribution: Tokoh commentedI have the same error. I have created a new entity of type node called "Property". (Sorry the name might be confusing. Here a Property refers to a block of land). If I try to create a new Property it generates this error. However it only occurs if I try to preview a new "Property". If I save then there's no problem If I try to open an existing Property and then preview it, no problem.
I have pulled all of the fields of the entity so now its just the content with its title. However the entity does use the gmap and location modules and I wonder if this is creating my problem.
When I try to look at the entity that generates the problem its virtually empty, just b:0.
I have no idea of how to go about dealing with this problem. Any suggestions would be welcome.
Comment #13
adroid CreditAttribution: adroid commentedI've nailed it down for my project - maybe it helps if write a long story and describe how I did it. :)
Problem cause in my case
Problem cause in my case were some orphaned nodes in node table. I have no idea why they existed but there were about 4 of them.
It means that entries existed in node table, but they were "empty" nodes - they didn't have any entries on other tables like field_data_body, node_revision and so. And when I tried to do 'node_load()' on them, it silently failed and returned false.
How I tracked it down
As I mentioned on comment #5
I got this error each time when cron was run. And on each cron run, nodes of type 'feed_item' was created and processed. So I knew that issue in my case was with nodes of type 'feed_item'.
So next I used PHP's function called debug_backtrace and I put it right before the line 7562 - before the line
and run the cron again (to cause that 'Missing bundle property...' error).
debug_backtrace showed all functions that were called prior the error and what parameters were passed. I kept my eye on node id's.
From that output I saw that at some point there was issue with node id-s and node loading.
In my case the failing node ID was 555. So I took the problematic node id and tried to load it: node_load(555);
node_load failed and var_dump returned false.
Then I went to database and looked node table and saw that this node is still there - weird.
After searching from other tables I found that this node was kind of "ghost" node - it didn't have any entries in other tables(although in my case, there should be entries at least in field_data_body and node_revision table regarding to that node).
Problem solution in my case
Then I wrote query to see if there are any other "ghost" nodes for content type 'feed_item' - I compared node and node_revision table to get all nodes which have entry in node table but don't have entry in node_revision table:
I ran this query for all my content types by changing the line n.type = 'feed_item' to reflect any content types I had.
If I had content type with machine name 'regular_page', I changed that part to: n.type = 'regular_page'
On ideal case and when everything is OK, this query should output 0 rows.
When there are issues with ghost nodes, it outputs their id and title and so - these are the nodes that caused the error because Drupal fails to load them by node_load().
That was it - by removing these few nodes, errors were gone.(and if they haven't died, they live happily ever after somewhere else. :))
Comment #14
castawaybcn CreditAttribution: castawaybcn commentedI am getting the same error. In my case it shows when trying to edit a node which contains Entity references (both users and node), this might be similar to @mgifford's case.
Comment #15
gooney0 CreditAttribution: gooney0 commentedI had the same issue. In my case I was querying a field_data_field_xxx table. It had a row which didn't correspond with any node.
I deleted the row and the error went away.
Comment #16
minorOffense CreditAttribution: minorOffense commentedI'm getting the same error message except I only get it when trying to add a new term via the node edit for using the autocomplete (tags) widget.
We have entity translation enabled along with field translations for the taxonomy terms.
There are two taxonomy reference fields on the node (each pointing to a different vocabulary) and adding a new term to either one causes the error.
I'm not entirely convinced this is entity API's fault. Taxonomy and Node entities don't use Entity API?
Does this issue occur for anyone without Entity API installed?
Comment #17
LTech CreditAttribution: LTech commentedI have this error: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7642 of /xxx.xom/mg-testsite.com/ubercart/includes/common.inc).
The website encountered an unexpected error. Please try again later. and it is crashing my whole site. I thought I had it sorted by deleting the media module, the error went away but now it is back again.
help my site is a white page!
Comment #18
LTech CreditAttribution: LTech commentedOn a 2nd site I have this error only shows on the xxx.com/blog page which displays a wordpress blog view.
I think the errors started when I installed the media module but now I've uninstalled it I still can't get rid of the error.
Comment #19
kingswoodute CreditAttribution: kingswoodute commentedHi Same Error,
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7633 of /var/www/html/ssws/includes/common.inc).
Going to try the process outlined in #13. Thanks for posting that!
Comment #20
oteno CreditAttribution: oteno commentedHello,
i got the same error. Solution in #13 worked great.
Thanks a lot @adroid
Comment #21
30equals CreditAttribution: 30equals commentedJust fyi,
mine was related with #1851118: Incorrect ET Handler set in node/add form when inserting new taxonomy term - so not really an entity api issue in my case (ended up here via Google) - but it might help maybe.
Comment #22
kenorb CreditAttribution: kenorb commentedThis was happening during search, so view was loading the invalid nodes.
Backtrace:
Workaround was to re-save some nodes which had some wrong references during the import.
Here is sql query which I've used to track the invalid references:
Where field_data_field_some_ref is data field of field_some_ref which is type of 'Term reference'.
Comment #23
kenorb CreditAttribution: kenorb commentedRelated:
#687180: Deleting a taxonomy vocabulary leaves term reference fields still pointing to it, and a PDO Exception when creating content
#1281114: Database records not deleted for Term Reference Fields after Term is Deleted
#1627312: Deleting taxonomy terms doesn't update entities with term reference fields
Comment #24
kenorb CreditAttribution: kenorb commentedFor orphaned taxonomy references:
#1281114: Database records not deleted for Term Reference Fields after Term is Deleted
Workaround: orphaned_taxonomy module.
For Views module:
#1473228: hook_field_formatter_prepare_view never called for entity fields attached to the current node on a node page
For Search API:
#1402270: ResponseText: EntityMalformedException: Missing bundle property on entity of type profile2
For Feeds module:
#1394320: Orphaned items in feeds_item table can cause an EntityMalformedException
Comment #25
PapaGrandeIn case anyone else is looking for clues to debugging an EntityMalformedException error, I found that when calling field_get_items() and the entity is missing, my page borked without a graceful error message. Adding a test for a valid entity before calling field_get_items() fixed it.
Comment #26
mattheweigand CreditAttribution: mattheweigand commentedThe procedure in #13 worked for me. I had installed a CPU-limiting script on my amazon AWS micro server (http://cpulimit.sourceforge.net/) in order to try to limit the amount of CPU time my Drupal 7 instance was running. During the day that I had this web server thing running, I tried to create some new nodes and got a PHP timeout error. I ended up removing CPULimit because of this. But each time I got an error in making a new node I had inadvertently created what #13 describes as a "ghost" node. These ghost nodes could not be processed by search and caused search indexing to stop. Two weeks later I realized that no new nodes were being indexed. I ran drush search-reindex --immediate --verbose on my server and got the error "WD php: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids()". A google search led me to this thread, and I followed the procedure in #13 and deleted 8 "ghost" nodes. After that I reindexed the site and everything works perfectly.
Comment #27
tatewaky CreditAttribution: tatewaky commentedHi PapaGrande or anyone, how can i validate if a entity is valid or not? im looking for the answer in google but i can't found it, if you guys have the answer that would be killing, thanks.
Comment #28
PapaGrande@tatewaky, I believe I just did a !empty() test on the entity variable before calling field_get_items().
Comment #29
tatewaky CreditAttribution: tatewaky commentedThanks @papagrande i'll check it out.
:)
Comment #30
nasia123 CreditAttribution: nasia123 commentedI run the query from #13, and got 0 results
I also installed orphaned_taxonomy which found some orphaned taxonomy terms and fixed them.
but I still get the error ...
The error in my case is displayed when I use the preview node option in a node that has workbench moderation enabled.
I am also using field group.
Comment #31
Yuri CreditAttribution: Yuri commentedmodule orphaned taxonomy 0 (zero) results. Still this error happens when adding a node that has an entity reference field that is used for tagging, while a new term is inserted that does not yet exist in the taxonomy. When a term is selected that is already available, the error does not appear.
Comment #32
thermador CreditAttribution: thermador commented#13 worked for me, thank you SO MUCH. Because of one single orphaned node, my Drupal 7 site's search module wouldn't complete reindexing past that node. So I couldn't reindex the site, nor add to the existing index (via cron) when new content was posted.
I found this thread because I was using "drush cron --verbose" at the command line to try and figure out why reindexing wouldn't complete, and I got the "EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids()" error message.
Comment #33
Ed Vogt CreditAttribution: Ed Vogt commentedUsing commerce and feeds, same issue.
Removed the orphaned feeds_item, guid records.
All good.
Comment #34
Rahul Seth CreditAttribution: Rahul Seth commentedstill facing "EntityMalformedException: Missing bundle property on entity of type node.
Comment #35
amir0220 CreditAttribution: amir0220 commented#13 was my solution. node_load($nid) was failing because $nid was empty in some cases. Didn't have to dig too much to find where the problem was because it happened on the last thing I modified on the code and I knew where that was.
:)
Comment #36
Exploratus CreditAttribution: Exploratus commentedTHat is my problem, created sometimes when a large feeds import crashes. The node revision entry fails to get created. The problem is I have 89 tables, is there an easy way to go through and delete orphaned fields / nodes with missing revision entry?
Comment #37
Kattia CreditAttribution: Kattia commentedI have this issue happening on workflow fields I am using buttons to show the state
Comment #38
jasonaaronwood CreditAttribution: jasonaaronwood commentedI was just in the middle of converting a few nodes to another node type and suddenly got this error.
EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7633 of /home/content/40/5305940/html/includes/common.inc).
It completely blocks off my ability to:
*view/edit the node
*view the panels page where it was previously featured (I was editing via the panels "gear" icon)
*view the admin/content list
I can tell it's node 672 because that's the one it won't let me view; all the others seem fine. How do I delete a node from the node table (sorry, I'm sure it's not too hard but I just don't know where to start)?
Comment #39
j.am CreditAttribution: j.am commentedI am getting this error when I try to access any system page.
Front facing website is fine, I can navigate all published pages as anonymous, but I can't get to the login page because of this error, so I'm effectively shut out of the site admin.
The structure of my theme is still being rendered, everything before the content, then it fails to load the node, and everything after that, the node, the footer, does not appear.
This does not happen for any of the nodes I have created, they render fine, but when I go to a system node: user/login, admin/*, or a node that does not actually exist like node/3000, it gives me the missing bundle error instead of the content.
SOME TIME LATER....
My issue was caused by rendering a field by calling
print render(field_view_field('node', $node, 'field_top_image', array('label' => 'hidden')));
in my layout.tpl.php (ie page.tpl.php if I was not using omega 4 layouts). The field_view_field function is not recommended for templates, and my issue would be one of the reasons why.
Fixed by rendering a field by calling
print render($page['content']['system_main']['nodes']['1']['field_top_image']);
in the tpl.php after inspecting $page object with devel module enabled and dsm($page) added to my .tpl.php
Comment #40
mpp CreditAttribution: mpp commentedThe following is a similar error that can be reproduced with apachesolr in combination with ds_search and entity fields (e.g. references or field collections):
"EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7734 of includes/common.inc)"
When a node with entity fields is deleted in Drupal but still exists in SOLR, ds_search will try to render it and fails.
A quick fix would be to skip processing search results if they no longer exist in Drupal:
/**
* Process results on behalf of Apache Solr.
*/
function ds_search_process_results($results) {
$processed_results = array();
if (is_array($results) && !empty($results)) {
foreach ($results as $result) {
$load = entity_load($result['fields']['entity_type'], array($result['fields']['entity_id']));
$entity = reset($load);
+ if (empty($entity)) continue;
Comment #41
ryanc CreditAttribution: ryanc commentedI was seeing this error when using VBO and Workbench Moderation. It was fixed by https://www.drupal.org/node/1787214#comment-7616287
Comment #42
gaurav.pahuja CreditAttribution: gaurav.pahuja commented#13 working for me :)
I was not sure about the corrupted content type so modified the query accordingly.
Comment #43
davidneedhamFor me certain nodes and search generated this error. I fixed it using suggestions from @kenorb in #22. I downloaded the Taxonomy Orphanage module, ran it, and everything worked again. Thanks kenorb!
Comment #44
Poindexterous CreditAttribution: Poindexterous commentedI ran into this error with a site I had to diagnose, this error was preventing the site from indexing during cron. Sadly none of the above solved my problem but it certainly helped me get on the right track. My issue was caused by multiple bad nodes, some were content type orphans, but one seems to be corrupted in some way and it even prevented Taxonomy Orphanage from executing! I wound up creating a view to filter out nodes where the content type was null, but the one remaining corrupted node remained elusive.
I'd like to provide a link that helped me when Taxonomy Orphanage failed to run:
http://tappetyclick.com/blog/2013/01/14/how-find-bad-node-makes-search-i...
This suggestion hacks core just a bit (temporarily) to use watchdog to catch the NID of the entity that cron is processing right before it breaks down. This is the only thing that worked identify the final rogue nid that was throwing this error and causing indexing to halt.
I know that hacking core is a no-no, and I did this on a local environment then reverted the files back when finished (now that I have all the bad NID ids I can go to prod and delete them). However I wasn't able to find any other way to ID the one node that was proving to be the trouble maker. I'm not quite familiar enough with programing to figure out a more endorsed solution, but someone else out there might. I'm not sure if it's possible to do but it would be helpful if errors like "EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() " may be changed in the future to include a NID or entity ID.
Comment #45
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 #46
kenorb CreditAttribution: kenorb commentedComment #47
webjazznl CreditAttribution: webjazznl commentedAlright, reading this post there seems to be a myriad of ways to run into this problem. I got the same error in a different line number (because of advancing Drupal versions I suppose)
Missing bundle property on entity of type node. in entity_extract_ids() (line 7729 )
In my case it occured on an existing view that used the Search API. At some point during development (involving creation and deletion of nodes) the index became misaligned it seems. Clearing all the indexes i had running in Search API did the trick!
So also clear them indexes when running into this one folks!
As a side note: The strange part was that earlier backups of my database made with Backup and Migrate, that were working fine earlier on, started showing the same problem. So apart from the cache, Backup and Migrate skips the index tables too it seems...
Comment #48
Tomáš Fejfar CreditAttribution: Tomáš Fejfar commentedIn my case it was caused by using Accordion Views module and having Display Suite display mode set. When I set it to Fields it disappeared.
Comment #49
oknateI had this problem when nodes would be deleted by the feeds module. For some reason Drupal doesn't vet the nodes before trying to load them. I found a work around by using hook_apachesolr_search_page_alter and removing the offending nodes, if they are no longer on the node table, as well as pinging the apachesolr module to remove them.
Here's the fix:
Comment #50
matthieu_collet CreditAttribution: matthieu_collet commented@oknate, I've got the same problem and putted your function in a custom module
but when is it activated ? at indexation ? it doesn't fix the problem for the moment in my case
Comment #51
rangi500 CreditAttribution: rangi500 commentedPutting a debug_backtrace() before the exception is thrown (as recommended in #13 above) helped me track down this problem. A custom module was getting a node with menu_get_object() and passing this into field_get_items(). When the block was being displayed on the "Add node" form, $node was empty and this exception was being thrown. So I added a check to make sure $node is not null before calling field_get_items().
Comment #52
leopathu CreditAttribution: leopathu commentedHi,
I have faced the same problem, while programmatically create a node. But i have solved the problem. In my case i didn't mention the node type. I think, that the problem in this case for term.
Comment #53
marcoka CreditAttribution: marcoka commentedi had this problem when i used views_insert and had a taxonomy field there. if i remove it it works
https://www.drupal.org/project/insert_view
Comment #54
kenorb CreditAttribution: kenorb commentedThis is duplicate of: #1778572-24: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7562
See also:
- EntityMalformedException in custom module. Can anyone see what I did wrong?,
- EntityMalformedException: Missing bundle property on entity of type node in modal,
- EntityMalformedException: Missing bundle property on entity of type commerce_customer_profile,
- EntityMalformedException: Missing bundle property on entity of type student. in entity_extract_ids()
Comment #55
colorfieldThis issue, related to the taxonomy_term bundle in my case, caused a crash of the search index. First, I tried to apply the patch mentioned in this related post EntityMalformedException: Missing bundle property on entity of type taxonomy_term but rolled back the change.
Here is the stack trace after running
drush search-reindex --immediate --verbose
#0 /var/www/my_site/www/includes/common.inc(8024): entity_extract_ids('taxonomy_term', false)
#1 /var/www/my_site/www/sites/all/modules/custom/common_tools/common_tools.module(547): entity_uri('taxonomy_term', false)
#2 /var/www/my_site/www/modules/field/field.default.inc(210): common_tools_field_formatter_view('node', Object(stdClass),
Array, Array, 'und', Array, Array)
#3 /var/www/my_site/www/modules/field/field.attach.inc(209): field_default_view('node', Object(stdClass), Array, Array, 'und',
Array, 'search_index', NULL)
#4 /var/www/my_site/www/modules/field/field.attach.inc(385): _field_invoke('view', 'node', Object(stdClass), 'search_index',
NULL, Array)
#5 /var/www/my_site/www/modules/field/field.attach.inc(1228): _field_invoke_default('view', 'node', Object(stdClass),
'search_index', NULL, Array)
#6 /var/www/my_site/www/modules/node/node.module(1414): field_attach_view('node', Object(stdClass), 'search_index', 'fr')
#7 /var/www/my_site/www/modules/node/node.module(1335): node_build_content(Object(stdClass), 'search_index', 'fr')
#8 /var/www/my_site/www/modules/node/node.module(2792): node_view(Object(stdClass), 'search_index')
#9 /var/www/my_site/www/modules/node/node.module(2774): _node_index_node(Object(stdClass))
#10 [internal function]: node_update_index()
#11 /var/www/my_site/www/includes/module.inc(866): call_user_func_array('node_update_ind...', Array)
#12 [internal function]: module_invoke('node', 'update_index')
I figured out that deleting the nodes with a status of 0 solved the issue and the search index is now working again. Some missing taxonomy_term references were (maybe) still used in these unpublished nodes? Will maybe ring a bell.
Comment #56
jbd44 CreditAttribution: jbd44 commentedFor me, this error was thrown by my implementation of
hook_node_info
. Changing the base attribute from'my_module'
to'node_content'
fixed the problem.Comment #57
jazzitup CreditAttribution: jazzitup as a volunteer commentedActually the following comment helped me a lot to debug my own issue that led me to this: #1277376-49: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7390
Within my custom module I had this code:
It has nothing to do with Drupal - it is NOT Drupal's fault. It's a human error. In other words, field_view_field() has been triggered even on node/add pages, so I needed to change the code into something more meaningful like this:
That resolved my issue completely. I hope it will help someone to debug his similar issue quickly.
Comment #58
meecect CreditAttribution: meecect as a volunteer commentedSimilar to #13, it turned out to be an entry in the node table (and the revisions table) that didn't have corresponding entries in other tables, and also was of a content type that we no longer had anymore.
Luckily for us, the entry stuck out like a sore thumb just looking at the node table, so we found it easily.
We are still ot sure what caused the problem to just appear, but we think it was due to a number of factors during our development process. For example, we upgraded some modules that ran some schema alters, which could have revealed the problem, or it could have been that we had just configured solr and varnish.
So, we _think_, those changes contributed to the problem. So, we changea taxonomy field definition, and the solr knows it needs to index all the nodes that term is on, so it loads all nodes, but then encounters the issue with a 'bogus' node in the node table that has no corresponding entries in all the associated tables.
In a way, this is the reverse situation of the 'taxonomy orphanage' problem. Although many people have solved this problem, or a very similar symptomatic problem with that module, our problem was different. In taxonomy orphanage, the problem was nodes that refer to taxonomy terms that no longer exist, and in this case, it was nodes that exist that don't have the rest of their data.
Or something like that.
Comment #59
khosman CreditAttribution: khosman commentedHappened here when I set a view (as in "the views module" versus a content type's view mode) to show "Display Suite" with a display view (as opposed to fields); setting it to "Content" instead of "Display Suite" made the problem go away.
Comment #60
jason1234 CreditAttribution: jason1234 commentedI am trying to add the comment to the content type's page panel, I get the following error:
Attempt 1
Attempt 2
Comment #61
HansKuiters CreditAttribution: HansKuiters commentedUsing debug_backtrace() from #13 helped me a lot. I was importing flexifield data from D6 database to field collections in D7 database. Because D6 was still the live site, I imported nodes from D6 that were not yet available on new D7. That throwed the error. I now added a check for the node to be available on D7.
Comment #62
TheDelta CreditAttribution: TheDelta commentedI used the devel module and ddebug_trace() (https://api.drupal.org/api/devel/devel.module/function/ddebug_backtrace/7) to find the issue. (kudus to #13)
It took a bit but it was caused by my custom written field in Display Suite, which I was copied for another content type and it was referencing the wrong field.
Comment #63
Nikrene CreditAttribution: Nikrene commentedI had the same issue after deleting one taxonomy term and editing the title and url of another term. I was happy to see though that Clear all caches was the solution for me!
Comment #64
jkdev CreditAttribution: jkdev commentedUse DRUSH with -d
It helps a lot!!
In my case it was the module commerce_auction.
Backtrace:
This is the code in the mentioned module:
I guess the purpose of it, is to set the field 'starting price' to what ever price in the product.
The problem is that the code assumes that product loaded successfully, and as you can see clearly above,
$product = commerce_product_load($product_reference['product_id']);
simply return false.
To get around it, I hacked the module, adding necessary checks.
Hope it will help someone in the future.
Comment #65
leisurman CreditAttribution: leisurman commentedHow can I use the php query from #13?
Should I place this in a module or add the code right to a page using php input format,
Oe should I create a View and add it in using the php filter?
Comment #66
leisurman CreditAttribution: leisurman commentedI got rid of this error by deleting all nodes that had not cck and no title. Ghost nodes. I had 80.
like this
DELETE FROM `databasename`.`node` WHERE type = '';
Comment #67
kenorb CreditAttribution: kenorb commentedTo troubleshoot EntityMalformedException, check: How to debug EntityMalformedException at DO?
Comment #68
GaneshKumar CreditAttribution: GaneshKumar as a volunteer commented#4 works for me.
Comment #69
arunkumar53 CreditAttribution: arunkumar53 commentedSame problem here, my search is showing old data,while running a cron it showing sucessfully cron ran but in error log it showing
Missing bundle property on entity of type node. in entity_extract_ids()
I tried following options #4,#13, Taxnomy Orphange nothing is working.
Kindly guide me to close this
Comment #70
MatthijsG CreditAttribution: MatthijsG as a volunteer commented@arunkumar53 did you try #66?
It helped me; there was an orphaned node (not tag!) in the node-table.
Comment #71
poniesThanks, Tomáš. The views accordion / display suite conflict was the magic bit that solved our issue.
Comment #72
Nikolay Borisov CreditAttribution: Nikolay Borisov commentedthis may happen if you try to load an Entity with an id that is not really an id of an entity.
Per say: node_load('bananas');
or
entity_load('user', 'Peter the anteater'); // here it expects an id again
Hope it helps someone,
cheers!
Comment #73
Mfeldman7282 CreditAttribution: Mfeldman7282 commentedI can't seem to get any errors to display using debug_backtrace(); Where did you see the errors after running the Cron Job?
Comment #74
Anonymous (not verified) CreditAttribution: Anonymous commentedThank You flesheater, #72
That was my case, I was sending string not int as an ID
Comment #75
javierlandini CreditAttribution: javierlandini as a volunteer commentedIn my case, I was trying to create some terms programatically with Entity API. The vocabulary of the terms has a term reference field to reference fields from a different vocabulary.
I was doing something like:
where $countries_tids is an array of tids that I build previously with the list of terms from the other vocabulary that I need to reference from my new term.
This was throwing this error: EntityMalformedException: Missing bundle property on entity of type taxonomy_term. in entity_extract_ids() (line 7908 of /var/www/wwe/includes/common.inc).
Surprisingly, if I didn't set field_country_code, the above code worked well and created the new term (obviously, without that field set in the newly created term).
And what I finally did to make it work was adding the vocabulary machine name to the data array, so my final code is like this:
Hope this helps someone.
Comment #76
trong.nguyen.tcec CreditAttribution: trong.nguyen.tcec commentedIf you use module Colorbox field formatter and Error happen on viewing node (the node has field(s) with entity reference) try to disable module for test.
Comment #77
jurgenhaas@trong.nguyen.tcec, why are you saying this? Have you got any evidence, that colorbox_field_formatter has anything to do with this? You also reported #2870940: EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7929 of /includes/common.inc) and to this point, I can't see any reason why that module should be responsible for that error.
So, your recommendation to disable it (in bold!) is not justified as far as I can tell.
If there is an issue with colorbox_field_formatter, of course we are going to fix that. But please do not recommend to disable it. It's a module being used by over 2.000 sites and by that a fairly popular module. Your advise may be perceived as misleading by some.
Comment #78
rhemeleers CreditAttribution: rhemeleers commentedA feedback:
The error appeared after I tried use the "CONVERT" module to change the content type for a node. I deleted the page manually and the problems was gone
Comment #79
yurg CreditAttribution: yurg as a volunteer commentedSeems to be unresolved so far so here's (not)my 2c: http://www.staciearellano.com/bad-node-bad-node-whatcha-gonna-do/ link describes a workaround, which corresponds to some other comments in the thread.
Comment #80
Clemence.Blazy CreditAttribution: Clemence.Blazy commentedThanks a lot to #13 who saved my life. Just put the sql query in MyPHPadmin, and found the faulty content, delete it, and everything went back in order. No more errors or warnings, and cron back to work. Still today in 2017.
Comment #81
Kris77 CreditAttribution: Kris77 commentedI have this problem when save a node. In my content type there is a a email field with field validate for unique value.
The problem does not always present, but when it happens all fields of the content type are filled but is not assigned a nid and vid to the node.
The url is also created(example url/123456), but if search in node and node_revision table for that url there is nothing.
So, if I trie to create another node with same field value and change only email field value the node is created.
With #13 i have no result because there isn't nid or vid.
Thank you so much.
Comment #82
ayandyan CreditAttribution: ayandyan commentedTook me an hour to find the cause of the issue. Mine is due to the Taxonomy Term Status module where for some reason it clears the vocabulary machine name of the entity in common.inc.
It's not really an absolute fix, but I unchecked the "Enable term status" setting for the module (/admin/config/system/termstatus) to get going.
Comment #83
othermachines CreditAttribution: othermachines commentedJust thought I'd note that I was getting this error on cron, and it was a result of an entry stuck in the core queue table from when I was setting up bulk email functionality using Views Bulk Operations. The error itself may have been due to a malformed token, as the entity type being processed was actually user, not node.
Anyway, cleaning out the queue table solved it.
The error:
Comment #84
ykoech CreditAttribution: ykoech commented#13 worked perfectly for me and solved other indexing errors. Thank you.
Comment #85
trong.nguyen.tcec CreditAttribution: trong.nguyen.tcec commentedIf you use module "xmlsitemap_node", please use this path on file xmlsitemap_node.module:
Comment #86
Kris77 CreditAttribution: Kris77 commentedI noticed that, in my case, the error appears when the node id does not match the revision id.
Can someone give me a solution?
Thanks so much.
Comment #87
lubwn CreditAttribution: lubwn commentedAnyone coming to this issue - it was related to Feeds module in my case. But since I had almost finished site and did not want to re-build it from scratch, I just decided to deal with the problem.
So my error was:
EntityMalformedException: Missing bundle property on entity of type commerce_product. in entity_extract_ids() (riadok 7948 z /var/www/clients/client1/web30/web/includes/common.inc).
So it was related to "commerce_product" entity.
Solution:
Find this table in phpmyadmin and set autoincrement value to very high number - like 10000 or so.
What caused this problem:
I think I imported a LOT of nodes and commerce products via feeds, and deleted them afterwards. But Drupal did not cleaned all the things up and left some orphaned rows somewhere. Maybe they are entities, maybe they are nodes.. I have no idea. But it works nicely now.
So just find a table and increase autoincrement. It does not "solve" the problem in the proper way, but rather hide it for good.
Comment #88
JasonSafro CreditAttribution: JasonSafro as a volunteer commentedI got the same error, tied to the OG module. There were leftover rows on og_membership for nodes that were deleted. See https://www.drupal.org/project/og/issues/2900273.
Patch #14 worked for me.
Comment #89
wasid CreditAttribution: wasid as a volunteer commentedI faced the issue in 2023 after changing a term name which was assigned to a node. without deleting or backing up anything I just reassigned the changed term to that same node and the problem was fixed.