Hey guys, I been struggling on this for a while! I have installed the commerce shipping module, and I always get the error EntityMetadataWrapperException : Unknown data property shipping_method after I press the "continue" button in the checkout form, but when I disable the shipping module, it all works fine ! (same error with dev and beta version)

Comments

googletorp’s picture

Status: Active » Postponed (maintainer needs more info)

What version of commerce and entity are you using?

masterpiece’s picture

Entity version is 7.x-1.0-beta8 and commerce version 7.x-1.0-beta3

masterpiece’s picture

Status: Postponed (maintainer needs more info) » Active
googletorp’s picture

Status: Active » Postponed (maintainer needs more info)

I'm unable to reproduce this. I also have a live site runnning this module which also works without any problems.

The problem most likely arises from calling commerce_shipping_line_item_title on a line item with a different type than shipping, as it otherwise wont have the shipping_method property.

My guess is that you have altered a view or something similar that causes this error.

Anyways for me to be able to fix this I need i guide on how to reproduce this on a fresh install.

masterpiece’s picture

Ok, adtually the error occured after updating the drupal commerce module,

googletorp’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

This doens't seem related to commerce_shipping, closing.

aries’s picture

Status: Closed (cannot reproduce) » Postponed (maintainer needs more info)

I got the same error. My hotfix was to comment out the line

$line_item_wrapper->shipping_method = $plugin['method_id'];

in the commerce_shipping_line_item_new(), around line 337.

aries’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
googletorp’s picture

Assigned: Unassigned » rszrama

This is essentially the same problem as #1107788: Unknown data property commerce_product. in EntityStructureWrapper->getPropertyInfo()

I've assigned Ryan to this, but I don't expect to work on it here, but instead get it resolved in Commerce.

If you run into this problem you should be able to run commerce_shipping_configure_line_item(); and it should create the missing field that wasn't created during install for unknown issues, or you can reinstall the module.

aries’s picture

#9 is ok, but somewhere the shipping_field field had been created earlier, so it's not enough to fire this function but had to remove the field manually (eg. with removing the "field_revision_shipping_method" and "field_data_shipping_method" database tables). Maybe it's a bug somewhere else (Core?).

googletorp’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

If you already had the tables installed, either something was messed up when the field was created (core issue) or you did some alterations in the db or via custom code (you made the problem your self). Either way this is not the same issue and not related to commerce shipping, so marking this as fixed again.