Closed (fixed)
Project:
Commerce Yotpo
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2013 at 15:23 UTC
Updated:
1 Aug 2014 at 00:35 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dwkitchen commentedYou probably need to set your product field on the Yotpo settings form. There is now a check for this.
Comment #2
dwkitchen commentedComment #3
lsolesen commentedSame error is till present - and the product field has been set.
Comment #4
dwkitchen commentedThink we have found the problem, do you have a product that doesn't have an image?
Comment #5
dwkitchen commentedAdded a check that the image field is not empty.
Comment #6
lsolesen commentedTried the newest version, and it seems to be fixed allright.
Comment #8
macman911 commentedHi, love Yotpo but I can't use it because I'm still getting the error. Using process of elimination I have found the fault, but I don't know how to fix it.
Instead of using the Drupal default body field for the product descriptions I created a new field for each product variation called "field_variation_description". This allows me to list different specifications/descriptions for each variation. I only use the body field to write further information about the product variations in general. The product review block appears for products which include text in the body field, however I get the error message for products with an empty body field. I would be extremely grateful if someone could help. Thank you.
Comment #9
dwkitchen commentedWhat you are experiencing was passably a duplicate of #2113655: Send historic orders gives error
Comment #10
macman911 commentedUnfortunately after trying the latest release 7.x-1.1 I still get the same error.
Comment #11
macman911 commentedI also get the error when I enable the Product Bottom Line block on pages that don't have a product description for instance on non product pages (or on product pages which don't have any text in the body field). I believe the bottom line block provides the review tab?
Comment #12
klagler commentedI'm using the latest release and have an similar issue when enabling the review block:
EntityMetadataWrapperException: Unable to get the data property value as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 438....Comment #13
klagler commentedAs macman911 mentioned above the problem seems to be the missing body field on product pages.
There should be a validation if the body field exists on line 123, 171 and 351 in commerce_yotpo.module
otherwise you will get this EntityMetadataWrapperException error if the body field is not present.
Comment #14
martinezsalmeron commentedI get the same error, so I am not being able to use the module.
I would really appreciate any ideas ;)
Comment #15
macman911 commentedMartinezsalmeron, if it helps my temporary solution is to only display the review blocks on pages where the body field is filled in. For me this means it at least works on 1/2 of my products.
Comment #16
jassics commentedI have same issue in my site http://www.cusatalumni.com
Whenever we try to post any comment on blog or forum, it is giving internal error page.
In error report it is showing:
EntityMetadataWrapperException: Unable to get the data property format as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 438 of /home6/cusatalu/public_html/sites/all/modules/entity/includes/entity.wrapper.inc).
and under http://www.cusatalumni.com/user#overlay=admin/reports/fields
it shows following warnings too:
Notice: Undefined index: comment_node_panel in _field_ui_bundle_admin_path() (line 325 of /home6/cusatalu/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: comment_node_panel in field_ui_fields_list() (line 35 of /home6/cusatalu/public_html/modules/field_ui/field_ui.admin.inc).
Notice: Undefined index: message_type in _field_ui_bundle_admin_path() (line 325 of /home6/cusatalu/public_html/modules/field_ui/field_ui.module).
Notice: Undefined index: message_type in field_ui_fields_list() (line 35 of /home6/cusatalu/public_html/modules/field_ui/field_ui.admin.inc).
It is driving me crazy. I tried various methods, enable/disabled many modules but no use
Comment #17
dwkitchen commentedjassics, looks like you are using panels to display your products.
I haven't tested with panels so will have to look at why it can't get the information it needs for the Widget.
Comment #18
joelpittetI'm using panels too, but what seems to be the issue is the body field being empty in my case. Trying to debug and see if I can't provide a patch.
So far it's happening here for me:
$description = $body_value->value->value(array('decode' => TRUE));Which is what #13 mentioned.
This could be a bug with entity module (currently using dev version of entity 7.x-1.5+2-dev).
Comment #19
joelpittetOk quick fix for now.
Comment #20
joelpittetRelated issue added
Comment #21
joelpittetThough that patch does seem to work, I think it's not correct...
Comment #22
joelpittetIt's doing the call twice, that's why I mentioned that it's not correct in #21, here's a better version, I'm manually doing the decode because this seems to be a bug with either panels or entity framework.
This side side steps the decode feature of entity framework for now without making multiple calls. This may be a micro optimization of #19 but you can be the judge...
Comment #23
joelpittetWhoops, forgot to grab the value from the value... in #21 oh well, now I like #19 better. So hiding #22
Comment #24
joelpittet@dwkitchen This is reproducible without panels I just checked to see if it was part of the mix.
Install entity
Create a custom module block:
Add that to a node with an empty body field and voila.
Comment #25
vasikei think this error is not more present.
However i think we need better settings for product fields.
1. Description field settings : we can use other field than node body field.
2. With 1. implemented, for both fields - image & description - we need fields from both entities types - product & product display (node) - available to be used.
Maybe we have the description in the product or mnaybe we have the image in the node.
there is a patch with an implementation for these.
Could you please review the patch and provide some feedback on this?
Thank you
P.S. QUESTION:
What if there are multiple product display types, product reference fields, product types?
Comment #26
joelpittet@vasike Thanks, I think I was not on -dev which was part of the problem but I unearthed a bit about the issue in the issue summary.
The bug lies in the entity module from my perspective but my patch in #19 works around the bug until it's fixed in #1596594: EntityMetadataWrapperException: Parent Data Structure Not Set.
Though I'm sure most of the code you've written is good, I suggest it be in a new feature request issue as it doesn't relate to the issue summary which is solely about the Exception.
Comment #27
joelpittetOh just a note, it looks like you fixed a different bug, here:
Before
body->value(array('decode' => TRUE));Does absolutely nothing more than returning value(). Where as your code checks for empty() value first like my fix in #19 then doesbody->value->value(array('decode' => TRUE));Which actually does what it's trying to do.Nice work!
Comment #28
vasikethere is a new patch, some fixes for the previous one (#25).
the same request/question.
Could you please review the patch and provide some feedback on this?
Thank you
P.S. QUESTION:
What if there are multiple product display types, product reference fields, product types?
Comment #29
joelpittet@vasike again, could you move this to a new issue so that it relates to the issue summary? The patch in #28 likely does some nice things but it's unclear how it helps the problem posted in the summary.
In addition, it would nice if you could provide an interdiff between patches so we can see the changes you've made and not have to re-read the entire patch to get up to speed. @see https://www.drupal.org/documentation/git/interdiff
Comment #30
joelpittetActually even better, this issue was already closed. It should be still closed.
The 7.x-1.x-dev version this issue doesn't exist anymore.