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.
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
Comment #1
spasmody CreditAttribution: spasmody commentedComment #2
fagoProbably commerce.
Comment #3
rszrama CreditAttribution: rszrama commentedSounds 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
Comment #4
Jax CreditAttribution: Jax commentedI 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.
Comment #5
Jax CreditAttribution: Jax commentedWhen 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.
Comment #6
GiorgosKsame thing happens to me
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 ?
Comment #7
GiorgosKIf you are using EVA update to the latest dev it worked for me
as joachim is pointing out inthis comment
Comment #8
GiorgosKmaybe I should close this issue since I reopened it
Comment #9
GiorgosKha ha I am out of here
Comment #10
BenStallings CreditAttribution: BenStallings commentedBeautiful! thank you!
Comment #12
craigbailey CreditAttribution: craigbailey commentedI'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.
Comment #13
craigbailey CreditAttribution: craigbailey commentedApologies 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.
Comment #14
rszrama CreditAttribution: rszrama commentedWhat other modules are you using? Did the solutions above give you any clues?
Comment #15
craigbailey CreditAttribution: craigbailey commentedThe 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.
Comment #16
craigbailey CreditAttribution: craigbailey commentedMy 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.
Comment #17
recrit CreditAttribution: recrit commentedI'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.
Comment #18
craigbailey CreditAttribution: craigbailey commentedI 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.
Comment #19
recrit CreditAttribution: recrit commented@craigbailey thanks!
I think its safe to pass to commerce_shipping
Comment #20
rszrama CreditAttribution: rszrama commentedHmm, 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.
Comment #21
acrazyanimal CreditAttribution: acrazyanimal commentedI 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.
Comment #22
kloewer CreditAttribution: kloewer commentedRan 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!
Comment #23
j_ten_man CreditAttribution: j_ten_man commentedThanks. #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.
Comment #24
joachim CreditAttribution: joachim commentedRelated 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...)
Comment #25
joachim CreditAttribution: joachim commentedA thought: would using http://drupal.org/project/field_helper help here?
Comment #26
amateescu CreditAttribution: amateescu commentedNope, the patch from #1361562-6: Re-enabling Commerce causes a PHP Fatal Error would help here, as tested by bojanz in that issue :)
Comment #27
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedI updated eva to the latest dev and it worked. am doing ubercart->commerce migration.
Comment #28
kevin.klika CreditAttribution: kevin.klika commented#23 fixed my issue, as well. Thanks Drupalers!
Comment #29
silkogelman CreditAttribution: silkogelman commented#23 fixed it for me too, thanks!!
I had Commerce Order editting trouble after uninstalling Shipping modules.
Comment #30
marcoka CreditAttribution: marcoka commentedsame here with the shipping module.
Comment #31
shawngo CreditAttribution: shawngo commentedI 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).
Comment #32
Pere OrgaI 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!
Comment #33
bryanhidalgo CreditAttribution: bryanhidalgo commented#23 fixed it for me, thanks!
Comment #34
cigotete CreditAttribution: cigotete commentedI 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: