Hello,
I get that error with both prod and dev versions :

EntityMalformedException : Missing bundle property on entity of type commerce_customer_profile. in entity_extract_ids() (line 7405 in /homez.353/edeation/iuej/includes/common.inc).

It is a drupal commerce problem or an entity problem ?

thanks

Comments

spasmody’s picture

Priority: Major » Critical
fago’s picture

Project: Entity API » Commerce Core
Component: Code - misc » Customer
Priority: Critical » Normal

Probably commerce.

rszrama’s picture

Category: bug » support
Status: Active » Fixed

Sounds like your installation failed to create the proper fields for some reason. This is often due to memory limitations during installation. There's a module that should fix the problem for you: http://drupal.org/project/commerce_repair

Jax’s picture

Status: Fixed » Active

I just tried to apply commerce repair but I keep getting the error.
I also updated the commerce and entity modules to their latest versions but that didn't help either.
The error I'm getting is about customer order though.

Jax’s picture

Status: Active » Fixed

When I start a new view with the latest version of everything it works so I'm going to leave it at fixed. If I can find out what is happening I'll update again.

GiorgosK’s picture

Status: Fixed » Active

same thing happens to me

EntityMalformedException: Missing bundle property on entity of type commerce_customer_profile. in entity_extract_ids() (line 7389 of /home/example/public_html/includes/common.inc).

when shipping information is in checkout pane then I get the error after checkout when loading review

if the shipping information is moved to the review order the checkout and review and order are complete succesfully but upon visiting the order I get the same error

does it have something to do with the addressfield module ?

GiorgosK’s picture

If you are using EVA update to the latest dev it worked for me

as joachim is pointing out inthis comment

GiorgosK’s picture

maybe I should close this issue since I reopened it

GiorgosK’s picture

Status: Active » Fixed

ha ha I am out of here

BenStallings’s picture

Beautiful! thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

craigbailey’s picture

I'm having a similar issue, is it possible to re-open this? My error is below:

EntityMalformedException: Missing bundle property on entity of type commerce_customer_profile. in entity_extract_ids() (line 7409 of /home/railrout/public_html/includes/common.inc).

I'm using the latest version of Drupal Commerce. I've tried commerce_repair without any improvements. This happens whenever I try to edit any order. Viewing details of the order works fine but as soon as I click edit I'm presented with that error, meaning I can't change the order status from pending. I created an example payment method which requires no validation or card details just in case it was related to my install of commerce_sagepay_direct but again that order returns the same error as soon as I try to edit it.

Apologies if this is in the wrong place, but I thought it would be better to post in this issue rather than creating a brand new one for what seems like the same error.

craigbailey’s picture

Apologies for the double post. Marking as active. I'm unsure if I should have created a new issue for my problem, but as I said they seem very related.

rszrama’s picture

Status: Closed (fixed) » Active

What other modules are you using? Did the solutions above give you any clues?

craigbailey’s picture

The solutions above unfortunately didn't help. I'm using commerce, commerce 3d secure and commerce sagepay direct. I also have addressfield, ctools, entity, imce, rules, token and views installed.

My database was backed up and then imported from a different server. I'm going to try a clean install and I'll post back my results as I don't recall this being a problem before. If it persists on the new install I'll try do some debugging and post the point where I believe it fails.

Thanks for your reply.

craigbailey’s picture

Status: Active » Closed (fixed)

My bad guys. On creating a new database this is fine. Bit of a brainfart, I should have tried a clean install first and compared the two. I'm still unsure of the cause. Maybe because I restored the database from a backup on a different server there was a missing relationship. Marked as closed.

recrit’s picture

I've seen that error after disabling and uninstalling commerce_shipping 2.x. Uninstalling removes the customer profile type that it defines, however, it leaves the field on the order entity for commerce_customer_shipping. Therefore when editing an order that has been created after uninstalling shipping, you receive the awesome missing bundle property error. Deleting the order field commerce_customer_shipping fixes the errors.

@craigbailey
Please confirm if you had shipping installed and then uninstalled.. or perhaps commerce_customer module that defines the billing type.

craigbailey’s picture

I did previously have commerce_shipping installed. I removed it due to unrelated errors appearing, but yes I did install and then un-install it.

Good spot recrit. I take it this is a problem related to that specific module then.

recrit’s picture

Project: Commerce Core » Commerce Shipping
Version: 7.x-1.x-dev » 7.x-2.x-dev
Component: Customer » Code
Category: support » bug
Status: Closed (fixed) » Active

@craigbailey thanks!
I think its safe to pass to commerce_shipping

rszrama’s picture

Title: EntityMalformedException : Missing bundle property on entity » EntityMalformedException : Missing bundle property on entity - after uninstalling a customer profile type module
Project: Commerce Shipping » Commerce Core
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: Code » Order
Category: bug » task

Hmm, let's move this back to Commerce's queue, as it's a general problem to solve in the Order module. The problem is I don't feel comfortable just deleting these reference fields automatically when a module defining a profile type is deleted. Perhaps we should just post a message that strongly implies you need to delete it or something. I'm just too worried that we could instantly disassociate untold numbers of customer profiles from their respective orders. Of course, we'd also need to figure out how to convert the customer profile types to other types... Not sure what the best solution will be.

So I'm changing this to a task but leaving the title intact so other people see it - the task is this: figure out what to do with customer profile reference fields the Order module creates for orders when a module defining a customer profile type is uninstalled. The answer will involve either field cleanup, strongly worded interface text, or something in between.

acrazyanimal’s picture

Title: EntityMalformedException : Missing bundle property on entity - after uninstalling modules providing reference fields » EntityMalformedException : Missing bundle property on entity - after uninstalling a customer profile type module
Category: bug » task
Priority: Critical » Normal

I guess this answers the question I posed in #1363338: Process for removing a custom customer profile type ... you don't know what to do at the moment.

My inclination is that the data should be cleaned up and/or archived somehow. Choice is always good. Perhaps a method that checks that a customer profile type definition still exists before displaying/editing an order; if possible disable rather then delete that field in the case that the check fails. At minimum I think the following would make sense:

Module disabled:
- disable associated customer profile pane (I believe you already do this?)
- disable associated order field

Module re-enabled:
- enable associated customer profile pane (I believe you already do this?)
- enable associated order field

Module un-installed:
- provide an api function that allows modules to delete all associated customer profile information and permanently remove the associated order field with administrator approval.

I don't think that a simple strongly worded message would be enough since the site admin might not wish to keep a customer profile type around, but may want to hold onto the data. If you are required to delete the order field when a module is disabled then you wouldn't be able to do that. At least I don't think you could?

Archiving could be just a matter of serializing the data and storing it. It could still be associated with an order, but by disabling/un-istalling and archiving customer profile data the admin would be giving up the right to edit/search that info. However, they would still be able to display it alongside other order info as "archived" profile info. At least this would be a somewhat simple and generic way to handle this problem. If the customer profile type defining module was later enabled/installed again you could everse the process and retrieve the info.

A suggestion anyway.

kloewer’s picture

Ran in to the same problem, #17 fixed it for me. http://drupal.org/node/1330882#comment-5354756

Had to log in using phpMyAdmin and did a search for commerce_customer_shipping
Deleted these fields in table field_config and table field_config_instance

After running update.php everything worked fine again!

j_ten_man’s picture

Thanks. #17 and #22 fixed this issue. Here are the queries I ran against my db to fix the issue (I didn't want to delete them in case I needed them):

UPDATE field_config SET active = 0 WHERE field_name='commerce_customer_shipping';
UPDATE field_config_instance SET deleted = 1 WHERE field_name='commerce_customer_shipping';

I then cleared the cache on the site.

joachim’s picture

Title: EntityMalformedException : Missing bundle property on entity - after uninstalling a customer profile type module » EntityMalformedException : Missing bundle property on entity - after uninstalling modules providing reference fields
Category: task » bug
Priority: Normal » Critical

Related bugs:

#1359116: disabling shipping causes field warnings
#1424276: error when trying to create or edit an order when Shipping module no longer present

That latter makes me think this is a critical bug. The entire store is broken after disabling shipping (fortunately in my case it's a dev server...)

joachim’s picture

A thought: would using http://drupal.org/project/field_helper help here?

amateescu’s picture

Title: EntityMalformedException : Missing bundle property on entity - after uninstalling a customer profile type module » EntityMalformedException : Missing bundle property on entity - after uninstalling modules providing reference fields
Category: task » bug
Priority: Normal » Major
Status: Active » Closed (duplicate)

Nope, the patch from #1361562-6: Re-enabling Commerce causes a PHP Fatal Error would help here, as tested by bojanz in that issue :)

JurriaanRoelofs’s picture

I updated eva to the latest dev and it worked. am doing ubercart->commerce migration.

kevin.klika’s picture

#23 fixed my issue, as well. Thanks Drupalers!

silkogelman’s picture

#23 fixed it for me too, thanks!!

I had Commerce Order editting trouble after uninstalling Shipping modules.

marcoka’s picture

same here with the shipping module.

shawngo’s picture

I updated Eva to the 7.x-1.2 release and was able to complete checkout. Similar to #27 but without the need to pull dev branch (given release timeline).

Pere Orga’s picture

I experienced this problem today after following this tutorial:
http://commerceguys.com/blog/commerce-module-tuesday-commerce-fieldgroup...

A week before I installed and disabled the latest version of Commerce Shipping.

I solved it using #17, #22 & #23. Thanks!

bryanhidalgo’s picture

#23 fixed it for me, thanks!

cigotete’s picture

I updated EVA from 7.x-1.1 to 7.x-1.2 and it worked. In addition, updating that module also has solved the following error message:

EntityMalformedException: Missing bundle property on entity of type commerce_product. in entity_extract_ids()