Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi,
Really like how this module makes it easy on the user, glad it’s here :-) It works fine for me when I’m creating new orders on the site, but I’ve also migrated a 4K orders from an Ubercart site. When I try to access any of those from the Orders tab on a user profile page, I get the error below:
EntityMetadataWrapperException:
Unable to get the data property product_id as the parent data structure is not set. in EntityStructureWrapper->getPropertyValue() (line 438 of /var/www/firealarms.com/public_html/profiles/commerce_deploy/modules/contrib/entity/includes/entity.wrapper.inc).
Backtrace:EntityStructureWrapper->getPropertyValue('product_id', Array) entity.wrapper.inc:86
EntityMetadataWrapper->value() entity.wrapper.inc:254
EntityValueWrapper->value() commerce_rma.module:249
commerce_rma_new_return_is_possible(Object) commerce_rma.module:220
commerce_rma_access('create', NULL, Object, Object) call_user_func_array('commerce_rma_access', Array)
menu.inc:647 _menu_check_access(Array, Array)
menu.inc:800 _menu_translate(Array, Array, 1)
menu.inc:1960 menu_local_tasks()
menu.inc:2256 menu_local_actions() commerce_backoffice.module:34
commerce_backoffice_views_pre_build(Object) view.inc:932
view->build(NULL) view.inc:1122
view->execute(NULL) view.inc:1190
view->render() eva_plugin_display_entity.inc:300
eva_plugin_display_entity->execute() view.inc:1343
view->execute_display('quick_edit_payment')
eva.module:89
eva_entity_view_alter(Array, 'commerce_order', NULL, NULL) module.inc:1163
drupal_alter(Array, Array, 'commerce_order') commerce.controller.inc:419
DrupalCommerceEntityController->view(Array, 'customer', NULL, 1) entity.module:622
entity_view('commerce_order', Array, 'customer', NULL, 1) commerce_order_ui.module:352
commerce_order_ui_order_view(Object, 'customer') call_user_func_array('commerce_order_ui_order_view', Array) menu.inc:527
menu_execute_active_handler() index.php:21
Seems this could be related to this EntityMetadataWrapperException: Unable to get the data property type issue, which has a patch, but I haven’t been able to work out if that’s true:
Any pointers would be very welcome!
Comments
Comment #2
thekenshow CreditAttribution: thekenshow commentedI should add that these migrated orders can be viewed and edited on the Admin side, but if I click Create a new return, a similar error occurs:
Also, that this site has Entity API 7.x-1.6.
Comment #3
thekenshow CreditAttribution: thekenshow commentedDigging into the order structure in the database, found a couple differences between new and migrated orders:
New orders have order_id == order_number, while migrated orders do not:
New line items have a populated data column, but migrated line items do not:
Given that the data in a new order contains entity_type, entity_id, and product_reference_field_name, that seems like a problem.