The following message is displayed when saving a display node:
EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. in EntityDrupalWrapper->set() (line 731 of /home/public_html/sites/all/modules/entity/includes/entity.wrapper.inc).

To reproduce, add a Price Table field to the display node type. Once added, create a node with the price table (via node/add). The site will encounter the following error.

Comments

pcambra’s picture

Why are you adding the price table to a display? you should add it to the product type, it will be automatically displayed in the display through the product reference field.

ron williams’s picture

While I understand adding it as a product and using a product reference, I intended to modify the price at the display level and have multiple displays reference the same product as landing pages. This would be used in cases where the same product is sold to different markets at different rates where they are provided the URL to purchase from via e-mail or other method.

pcambra’s picture

You've got many ways to do this, but using a price field at display level I'd say it's not recommended.
You could add many price table fields to the product and display/hide them depending on the conditions you want combined with rules.

ron williams’s picture

I suppose if the option is intended not to be used at the display level, we should not be providing the field for addition to the content types.

I did notice the price (not price table) field is available as well and works at the display level as well as product level.

pcambra’s picture

Status: Active » Fixed

Committed a fix to provide a default price table when the product is not available
i.e. when attaching the field to 'exotic' entities ;)

ron williams’s picture

Thank you!

Status: Fixed » Closed (fixed)

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