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.
I get error 'EntityMetadataWrapperException: Unable to get the data property name_line as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 438 of /---/sites/all/modules/entity/includes/entity.wrapper.inc).' when checkout order and go to Review, after billing information.
My checkout setting are:
Checkout
-Shopping cart contents
-Account information
-Billing information
Review order
-No panes on this page.
Payment
-Review
-Payment
-Off-site payment redirect
Checkout complete
-Completion message
Comments
Comment #1
Lexus1990 CreditAttribution: Lexus1990 commentedIt is not in payment module. I think it is in commerce core
Comment #2
pyxio CreditAttribution: pyxio commentedHello,
I am having the same issue. Did you find the solution? Thank you. Kevin
Comment #3
Denial CreditAttribution: Denial commentedSame issue here, please update with a fix if possible!
Comment #4
Exigo CreditAttribution: Exigo commentedHi, I think i have also the same one. I run a donation site, so I really do not need billing or shipping information and removed those from the checkout (admin/commerce/config/checkout) but it provided no help to this error.
Other actions that I have tried to solve the error:
Other symptom is that CKEditor and wysiwyg works in my other content types, but not in my product display content type. Also the tabs in edit mode are broken.
Comment #5
Exigo CreditAttribution: Exigo commentedI managed to solve my problem with #13 https://www.drupal.org/node/2053821 but there can be other causes for EntityMetadataWrapperException.
Comment #6
Exigo CreditAttribution: Exigo commentedThe error came back. Probably because of cache. Because I have a donation site I have tried to remove shipping and billing. If I take em out from checkout settings, the site breaks in checkout and from log I can see this error:
When I put them back site starts working but filling out address just to donate anonymously is not desired behaviour.
Comment #7
Lorenz Kraft CreditAttribution: Lorenz Kraft as a volunteer commentedHi all,
like the first answers states, i also think its a drupal core problem. There are several Google Results for several Modules when you search for "EntityMetadataWrapperException: Unable to get the data" .
But as many of us, we can not wait until someone somewhere fixes this core issue. So here is what i fixed:
File: ./profiles/commerce_kickstart/modules/contrib/commerce/modules/customer/commerce_customer.module
Function: commerce_customer_profile_default_label
Changed: Comment out "$label = $profile_wrapper->commerce_customer_address->name_line->value();"
I think this solution does work without drawbacks because the changed function has a fallback:
if (empty($label)) {
$label = $profile->profile_id;
}
Hopefully this will help people to NOT waste two days of diving into code thats not your own.
Greets,
Chris
Comment #8
pyxio CreditAttribution: pyxio commented@Lorenz thanks so much for this.
Comment #9
TynanFox CreditAttribution: TynanFox as a volunteer commentedHi,
I'm continuing to have this exact same issue, but for me, it's happening after the payment gets processed on the order.
Customer types in CC number and clicks submit.
Payment processes, but checkout returns this error message.
If the customer refreshes the page, they are redirected to the correct display, however. The payment processes normally despite this error. Finally it's interesting to note that this error is only occuring for annonymous users. Authenticated users and administrators do not get this error after checkout.
I have the latest releases and patches to all the commerce modules I am using. I've searched this issue high and low and can't find the culprit.
Is anyone else still having this issue? I already tried the solutions in this thread and they didn't work for me.
Comment #10
anneeasterling CreditAttribution: anneeasterling as a volunteer commentedI was also experiencing what Tynan reported. When an anonymous user went through the checkout process, they were get a failure on the confirmation (or payment page depending on the setup). The log reported:
"EntityMetadataWrapperException: Unable to get the data property profile_id as the parent data structure is not set."
The solution for me was the patch here:
https://www.drupal.org/node/2682867#comment-11085523
The buggy module was Commerce Addressbook Extras. Hope that helps someone else (so they don't have to spend the hours it took me to disable/enable all of the commerce modules they are using) and that I've added enough keywords to help Google find this. :)
Thanks,
Anne