Hello:
I have been trying to get rid of this bug for three days with no luck. It all begun when I run modules update via Drush. This triggered massive errors all over the place, from issues with paths (Unsupported operand types in path to "Store") to other kind of EntityMetadataWrapperException errors. It appears this error was introduced by one of those updated modules at random. (I suspect Entity API and Entity Reference are somehow the guilty ones) I slowly worked out all of them, but this one isn't going away. And it is killing me as it is keeping me from starting generating the final feature exports I need for the production server .
Shop Staging: In very advance stage of development (Almost ready to export features, build platform. 60 products, 30 product attributes with images, custom HTML5 widgets, 9 wholesale account types, retail, Quickbooks integration, etc) Renistalling core Drupal Commerce is propably impossible at this stage.
Versions
- Drupal Core: 7.x-dev
- Drupal Commerce: 7.x-1.x-dev
- CTools: 7.x-1.x-dev
- Entity API : 7.x-2.x-dev
- Rules : 7.x-2.0+15-dev
- Views : 7.x-3.x-dev
- Address Field: 7.x-1.x-dev
Other System Info:
- Multi-site set up (3) thorugh right now working on the master one from which I will spawn the Featues for the smaller sites
- Uses Entity Reference often: 7.x-1.x-dev
- Using UUID: 7.x-1.x-dev
- Originally this was a site started with Commerce Kickstar profile back in June. Because I am building a custom profile for this project, at one point I side-graded to a standard Drupal install so I could have a clean "profiles" folder.
THE ERROR
Note: In case it matters (which I doubt), I posted the error as it was printed in both the page and the log, which it includes three massive blank space gaps between the last three lines. To save space for this post I added "[BLANK SECTION]" manually instead.
EntityMetadataWrapperException: Unknown data property field_product. in EntityStructureWrapper->getPropertyInfo() (line 339 of /var/www/drupal/sites/all/modules/contrib/entity/includes/entity.wrapper.inc). Backtrace:
EntityStructureWrapper->getPropertyInfo('field_product') entity.wrapper.inc:396
EntityStructureWrapper->get('field_product') entity.wrapper.inc:417
EntityStructureWrapper->__get('field_product') commerce_product_reference.module:298
commerce_product_reference_entity_view(Object, 'node', 'block', 'en')
call_user_func_array('commerce_product_reference_entity_view', Array) module.inc:819
module_invoke_all('entity_view', Object, 'node', 'block', 'en') node.module:1388
node_build_content(Object, 'block', 'en') node.module:1285
node_view(Object, 'block') views_plugin_row_node_view.inc:103
views_plugin_row_node_view->render(Object) views_plugin_style.inc:310
views_plugin_style->render_grouping_sets(Array) views_plugin_style.inc:273
views_plugin_style->render(Array) theme.inc:51
template_preprocess_views_view(Array, 'views_view') theme.inc:1008
theme(Array, Array) views_plugin_display.inc:2526
views_plugin_display->render() view.inc:1119
view->render() views_plugin_display_block.inc:53
views_plugin_display_block->execute() view.inc:1182
view->execute_display('block') views.module:643
views_block_view('product_block_coda-block')
call_user_func_array('views_block_view', Array) module.inc:795
module_invoke('views', 'block_view', 'product_block_coda-block') block.module:853
_block_render_blocks(Array) block.module:674
block_list('sidebar_first') block.module:318
block_get_blocks_by_region('sidebar_first') block.module:268
block_page_build(Array) common.inc:5578
drupal_render_page('
[BLANK SECTION - 30 lines]
') common.inc:2582
drupal_deliver_html_page('
[BLANK SECTION - 30 lines]
') common.inc:2470
drupal_deliver_page('
[BLANK SECTION - 30 lines]
', '') menu.inc:532
menu_execute_active_handler() index.php:21Where the errors happen:
- Front Page or any page with views that uses product content type
- Views administration as an AJAX error when trying to work with a view that has product content types in it.
- When running cron either via UI or Drush
Solutions tried:
I followed some of the solutions being suggested by rfay and DC crew :
- I tried the Commerce Repair. Many times, though rfay did explain somewhere that Commerce Repair only works well with DC's core modules. In my case, it did not repair anything at all.
http://drupal.org/project/commerce_repair
http://drupal.org/node/1107788#comment-4964956
http://www.drupalcommerce.org/node/1008#comment-2164 ) - I tried clearing the Entity Info Cache via Devel using
entity_info_cache_clear();every time I tried anything.
http://drupal.org/node/1316834 - I did find a couple of test orders stuck in the admin, and as suggested by doug over here below, I deleted them. It did clear up most of the other EntityMetadataWrapperExceptions, BUT not this one. I also deleted a Commerce Order fee that was left over from these trassactions.
http://drupal.org/node/1411032#comment-5506764. - Based on a comment I cannot find now, I also used Registry Build often via Drush.
http://drupal.org/project/registry_rebuild.
Since I have this whole thing seriously backed up, I tried a few things a little bit on "wilder side" , not so much to find a solution but to see if they could point me out towards the culprit:
- I tried reinstalling both the Commerce Product Reference and Commerce Line Item using Devel and as expected, it triggered massive errors. Restored from back up.
- I tried to manually compare an older database with a copy of the latest version using the SQL schema version as exported by Schema, but I did not see any major differences in table structure.
- Checked the System table for misconfigured paths, disabled items (0) and the such, but I found nothing out of order.
Closing Oddities
- Checking my schema structure I found at least 27 fields (Field_SQL_Storage) that have mismatching entries, two per field. I doubt this would be in any way related as none are critical and they were already there before all this happened. All 27 fields have the exact same error.
Example:indexes field_dyb_fabric_1_target_entity: missing in database indexes field_dyb_fabric_1_target_id: unexpected (not an error) - I installed and uninstalled some minor modules that I had tried in the pasr and perhaps I forgot to uninstall prior to removing them from contrib: Commerce Coupon, Commerce Product Bundle. I read a couple of comments indicating these modules had some issues when not properly uninstalled. They all checked out and had been uninstalled properly.
If there was one time in the last 3 1/2 years that I have been truly of the edge as far as needing some assis, this is the one.
Thanks
Comments
Comment #1
3rdLOF commentedLatest Drupal Commerce upgrade magically solved this one.
Closed
Comment #2
gnucms.org commentedI have the same problem.
I have installed dev version, but the problem persists.
My scenario is "martplug installation profile".
Thanks for replies.
Comment #3
3rdLOF commentedHey gnucms: All I know is that it was doing this, I went to sleep, woke up, run a few updates on the code (which included the latest dev from Drupal core) and the it mysetriously disappeared. Not a trace.
Comment #4
fonant commentedSomething is indeed a bit random in this. I get
EntityMetadataWrapperException: Unknown data property field_products.on one of my sites after an update sometimes. I _think_ it gets fixed by visiting /admin/modules and then clearing the cache (if page cache for anon users is active).