I recently created a new profile type - so I now have two. The new profile contains a subset of my first profile type. Everything seemed to work and I created a new test user with the new profile. However, now when I try to view the profile details for any user, I get the following error:
EntityMalformedException: Missing bundle property on entity of type profile2. in entity_extract_ids() (line 7389 of ...includes/common.inc).
Existing data seems to be OK - and I can get to the edit screens by typing in the address.
I also have the i18n module installed (among many others).
Any idea what could be wrong?
Comments
Comment #1
jide CreditAttribution: jide commentedHaving the same issue.
Comment #2
DropInTheOcean CreditAttribution: DropInTheOcean commentedHi Jide, There was a preceding error in the log referring to the Eva module. So I found the same problem—and a patch that worked—on the Eva forum: http://drupal.org/node/1278742 ... hope this helps you too.
Comment #3
fagoComment #5
joeclarkia CreditAttribution: joeclarkia commentedI'm seeing this issue too. I don't think it's exactly the same as the Eva issue (undefined entity vs. missing bundle property). For me the issue shows up when I enable Aggregation in views. That's when I see this error: "EntityMalformedException: Missing bundle property on entity of type profile2. in entity_extract_ids() (line 7405 of /var/www/includes/common.inc).". At this point I can't edit the view at all due to this error, so I can't even turn aggregation off.
Comment #6
pandabrand CreditAttribution: pandabrand commentedI'm not using the eva module at all and I'm getting this? what do i do? it's completely broken the admin portion of my site. I have a custom theme for my site but i'm using seven as my admin theme and now it won't come up.
Comment #7
pandabrand CreditAttribution: pandabrand commentedok, i found my problem when i had this in my header:
this threw that error when I went to my logged in page under the drupal admin. anything?
Comment #8
fagoNo patch to review.
Comment #9
pandabrand CreditAttribution: pandabrand commentedskip this, value wasn't set in this account. dumb moves.
Comment #10
rooby CreditAttribution: rooby commentedI'm getting the same error message as the original poster in views where I have a search_api view returning user results, which have associated profile2 profiles.
Comment #11
rooby CreditAttribution: rooby commentedThis is actually a bug report because it is throwing errors, but I don't yet know what module it belongs to.
It is possible that it belongs to a number of different modules that have problems with their integration with profile2.
Comment #12
rooby CreditAttribution: rooby commentedActually, with my issue the error only occurs during the views live preview.
Comment #13
rooby CreditAttribution: rooby commentedRelated SearchAPI issue: #1402270: ResponseText: EntityMalformedException: Missing bundle property on entity of type profile2
Comment #14
kclarkson CreditAttribution: kclarkson commentedI am having this issue with EVA as well.
I understand there is a patch for EVA but if this is happening with other modules then could it be something in the code of Profile2?
Comment #15
jdlind38 CreditAttribution: jdlind38 commentedI noticed my issue stemmed from the Field Permissions module. I noticed that the Field Permissions module pushed out a new beta (7.x-1.0-beta2). The autocomplete started to work and the error went away. Make sure that the "Don't sort" option is selected in the reference field.
Comment #16
lpc CreditAttribution: lpc commentedHi,
#7
Had same problem with profile2. Try passing $profile_two['profile_name'] instead of $profile_two to field_get_items. It worked for me.
Comment #17
shythai CreditAttribution: shythai commentedComment #18
deggertsen CreditAttribution: deggertsen commentedI'm having this problem as well for users who have not yet completed their profiles (it works fine for those who have completed their profiles). I have a feeling it has something to do with the following code as mentioned in #16, but I haven't been able to figure out how to fix it.
Comment #19
deggertsen CreditAttribution: deggertsen commentedChanging the version.
Comment #20
deggertsen CreditAttribution: deggertsen commentedI fixed it for my case by adding conditional statements as follows:
Not sure if it's the best solution, but it works.
Comment #21
firfin CreditAttribution: firfin commentedThis error comes from using field_view_field() or field_get_items() with an empty or incorrect entity.
Problems like this usually come from custom code. Either in your custom theme, module, computed field or php text field. Therefore I think this is a duplicate of #1328534: EntityMalformedException.
If this is not the case please reopen AND provide steps to reproduce this problem.
Comment #22
davewilly CreditAttribution: davewilly commented#16 worked for me:
Comment #23
arnoldbird CreditAttribution: arnoldbird commentedNot sure if it's been said, but be sure to check that you actually have a profile:
Simply creating a profile type does not mean that users have profiles. They have to save their account subsequent to your creating the profile type, or they don't yet have a profile.