Hi
Seems to be an issue related to adding a contribution to the cart, getting the following errors on add to cart:
Notice: Trying to get property of non-object in commerce_product_line_item_populate() (line 1283 of (site root)/sites/all/modules/commerce/modules/product_reference/commerce_product_reference.module).
EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. in EntityDrupalWrapper->set() (line 744 of (site root)/sites/all/modules/entity/includes/entity.wrapper.inc).
Comments
Comment #1
compujohnny commentedCan you please make sure it's a commerce contributions issue, I suggest disabling the module and try adding regular products to cart and report the results
Comment #2
denpub commentedThere are other product types on the existing site and they work fine when adding to cart. It only happens with contributions.
Comment #3
denpub commentedUpdate - I went back to an older version of the site I'm working on, when commerce was last working without issue.
This version was running on:
Drupal version - 7.16
Drupal Commerce version - 7.x-1.4
Commerce Contributions version - 7.x-1.x-dev (dated 2012-09-03) (with yanniboi's patch to correct target price increase issue)
Experiment 1:
Updated contributions to the most recent build (dated 2013-03-15)
Result:
The errors above happened upon submitting a contribution to the cart. So these errors have something to do with the most recent build and have nothing to do with the version of Drupal or Commerce.
Experiment 2:
reverted Contributions to 7.x-1.x-dev (dated 2012-09-03) (with yanniboi's patch to correct target price increase issue)
updated Commerce to - 7.x-1.5
Result: still worked
Experiment 3:
Updated Drupal to 7.21
Contributions version 7.x-1.x-dev (dated 2012-09-03) (with yanniboi's patch to correct target price increase issue)
Commerce version - 7.x-1.5
Result: Unsupported operand types error when attempting to add a new contribution
Used yanniboi's patch to fix this problem with his target price increase fix
Result: everything works fine, with the latest version of Drupal and Commerce
Here is the function with yanniboi's patches:
So it appears that something newer in the most current build is causing the "Trying to get property of non-object" and "EntityMetadataWrapperException" errors.
Hope this helps pinpoint the issue. In the mean time I have a working version.