Hi there,

I have the same problem with the 'EntityMetadataWrapperException: Unknown data property commerce_product' error.

EntityMetadataWrapperException: Unknown data property commerce_product. in EntityStructureWrapper->getPropertyInfo() (line 339 of PATH_TO_BUILD/sites/all/modules/contrib/entity/includes/entity.wrapper.inc).

Everything was fine until I upgraded from version 7.x-1.1 to 7.x-1.2.

I have tried using the commerce_repair module, but this has not resolved anything.

My product display content type has a field called 'field_product_reference' to reference the commerce product. Are you saying that this should be named 'field_commerce_product' in order to work? I already have several products displayed on the live website. How should I go about changing this?

I can reach the edit page of the 'product display' nodes and the product name/sku in the product reference field is now empty. If I re-populate the field and save the node I still get the error...

I have tried removing the 'field_product_reference' and replacing with 'field_commerce_product' but this does not seem to change anything.

Would be most grateful of any suggestions here!

I am not sure what I need to do...

Many thanks, Kester

This is posted on the Drupal Commerce website too:
http://www.drupalcommerce.org/node/1242

Comments

featherbelly’s picture

Status: Active » Fixed

It turns out that 'node_export' and 'uuid' were causing the problem. I have removed them and re-applied updates and all working now.

rszrama’s picture

Title: ERROR: 'EntityMetadataWrapperException: Unknown data property commerce_product' » EntityMetadataWrapperException: Conflict with node_export and uuid
Category: bug » support
Priority: Major » Normal

Ok, thanks for the info!

geoffreyr’s picture

Just wondering, when you say "re-applied updates", which updates do you mean? I'm having exactly the same problem and it'd be great to try and work out exactly how to solve this. I started my current project on Commerce 1.2, and am using the current stable version of UUID. Were you able to patch UUID, or did you end up removing it altogether?

geoffreyr’s picture

Category: support » bug
Status: Fixed » Needs work

Attempted doing a fresh install of my Commerce 1.2 site. Worked flawlessly until I enabled UUID, and I got the above error once again. Given that it's the Commerce code calling this up, I reckon it may be a problem with Commerce itself. I'm going to spend a little while poking at the code to see if anything stands out.

geoffreyr’s picture

Here's the Commerce Devel backtrace:

EntityStructureWrapper->getPropertyInfo('commerce_product') entity.wrapper.inc:396
EntityStructureWrapper->get('commerce_product') entity.wrapper.inc:431
EntityStructureWrapper->__set('commerce_product', '3') commerce_product_reference.module:1080
commerce_product_line_item_populate(Object, Object) commerce_product_reference.module:1057
commerce_product_line_item_new(Object, 1, 0, Array, 'product') commerce_cart.module:2184
commerce_cart_field_formatter_view('node', Object, Array, Array, 'und', Array, Array) field.default.inc:210
field_default_view('node', Object, Array, Array, 'und', Array, 'teaser', NULL) field.attach.inc:209
_field_invoke('view', 'node', Object, 'teaser', NULL, Array) field.attach.inc:386
_field_invoke_default('view', 'node', Object, 'teaser', NULL, Array) field.attach.inc:1181
field_attach_view('node', Object, 'teaser', 'en') node.module:1361
node_build_content(Object, 'teaser', 'en') node.module:1285
node_view(Object, 'teaser', NULL) node.module:2534
node_view_multiple(Array) node.module:2560
node_page_default()
call_user_func_array('node_page_default', Array) menu.inc:517
menu_execute_active_handler() index.php:21

geoffreyr’s picture

I don't have any time to check this out further, but I'm wondering if UUID is messing with the commerce_line_item entity?

rszrama’s picture

Category: bug » support
Status: Needs work » Fixed

I don't see how Drupal Commerce should be responsible for a bug that's coming from enabling a third party module... unless you can show there's a bug in the Commerce code where it interacts w/ UUID, we should close this issue again and you should look to that module. It's easy for other modules to screw stuff up in the entity system; the node words (meta tags) module is another example of this.

yeaha’s picture

uninstalling node export and uuid solved the problem for me too, thank you for sharing!

Status: Fixed » Closed (fixed)

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