Hi, The result of a 'drush up' is below:

Code updates will be made to the following projects: EntityFieldQuery Views Backend [efq_views-7.x-1.x-dev]

Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
Project efq_views was updated successfully. Installed version is now 7.x-1.x-dev.
Backups were saved into the directory /Users/rkoberg/drush-backups/pfcc/20120527191359/modules/efq_views.               [ok]
PHP Fatal error:  Unsupported operand types in /Users/rkoberg/Sites/pfcc/www/sites/all/modules/efq_views/efq_views.views.inc on line 20
PHP Stack trace:
PHP   1. {main}() /Users/rkoberg/drush/drush.php:0
PHP   2. drush_main() /Users/rkoberg/drush/drush.php:14
PHP   3. _drush_bootstrap_and_dispatch() /Users/rkoberg/drush/drush.php:59
PHP   4. drush_dispatch() /Users/rkoberg/drush/drush.php:90
PHP   5. call_user_func_array() /Users/rkoberg/drush/includes/command.inc:165
PHP   6. drush_command() /Users/rkoberg/drush/includes/command.inc:165
PHP   7. _drush_invoke_hooks() /Users/rkoberg/drush/includes/command.inc:198
PHP   8. call_user_func_array() /Users/rkoberg/drush/includes/command.inc:324
PHP   9. drush_pm_updatecode_postupdate() /Users/rkoberg/drush/includes/command.inc:324
PHP  10. drush_drupal_cache_clear_all() /Users/rkoberg/drush/commands/pm/pm.drush.inc:1229
PHP  11. drush_invoke() /Users/rkoberg/drush/includes/drupal.inc:36
PHP  12. drush_dispatch() /Users/rkoberg/drush/includes/command.inc:38
PHP  13. call_user_func_array() /Users/rkoberg/drush/includes/command.inc:165
PHP  14. drush_command() /Users/rkoberg/drush/includes/command.inc:165
PHP  15. _drush_invoke_hooks() /Users/rkoberg/drush/includes/command.inc:198
PHP  16. call_user_func_array() /Users/rkoberg/drush/includes/command.inc:324
PHP  17. drush_cache_command_clear() /Users/rkoberg/drush/includes/command.inc:324
PHP  18. drush_op() /Users/rkoberg/drush/commands/core/cache.drush.inc:79
PHP  19. call_user_func_array() /Users/rkoberg/drush/includes/drush.inc:792
PHP  20. drush_cache_clear_both() /Users/rkoberg/drush/includes/drush.inc:792
PHP  21. drupal_flush_all_caches() /Users/rkoberg/drush/commands/core/cache.drush.inc:236
PHP  22. menu_rebuild() /Users/rkoberg/Sites/pfcc/www/includes/common.inc:7289
PHP  23. menu_router_build() /Users/rkoberg/Sites/pfcc/www/includes/menu.inc:2700
PHP  24. drupal_alter() /Users/rkoberg/Sites/pfcc/www/includes/menu.inc:2740
PHP  25. views_menu_alter() /Users/rkoberg/Sites/pfcc/www/includes/module.inc:1022
PHP  26. view->execute_hook_menu() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/views.module:349
PHP  27. views_plugin_display_page->execute_hook_menu() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/includes/view.inc:1352
PHP  28. view->init_handlers() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/plugins/views_plugin_display_page.inc:58
PHP  29. view->fix_missing_relationships() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/includes/view.inc:644
PHP  30. views_move_table() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/includes/view.inc:589
PHP  31. views_fetch_data() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/views.module:1506
PHP  32. _views_fetch_data() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/views.module:1175
PHP  33. module_invoke_all() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/includes/cache.inc:30
PHP  34. call_user_func_array() /Users/rkoberg/Sites/pfcc/www/includes/module.inc:823
PHP  35. efq_views_views_data() /Users/rkoberg/Sites/pfcc/www/includes/module.inc:823

Fatal error: Unsupported operand types in /Users/rkoberg/Sites/pfcc/www/sites/all/modules/efq_views/efq_views.views.inc on line 20

Call Stack:
    0.0005     706528   1. {main}() /Users/rkoberg/drush/drush.php:0
    0.0229    5048216   2. drush_main() /Users/rkoberg/drush/drush.php:14
    0.0916   11611736   3. _drush_bootstrap_and_dispatch() /Users/rkoberg/drush/drush.php:59
    0.5497   66964688   4. drush_dispatch() /Users/rkoberg/drush/drush.php:90
    0.6003   67860992   5. call_user_func_array() /Users/rkoberg/drush/includes/command.inc:165
    0.6004   67861360   6. drush_command() /Users/rkoberg/drush/includes/command.inc:165
    0.6008   67866120   7. _drush_invoke_hooks() /Users/rkoberg/drush/includes/command.inc:198
    0.6024   67937936   8. call_user_func_array() /Users/rkoberg/drush/includes/command.inc:324
    0.6024   67938304   9. drush_pm_updatecode_postupdate() /Users/rkoberg/drush/includes/command.inc:324
    0.6024   67938304  10. drush_drupal_cache_clear_all() /Users/rkoberg/drush/commands/pm/pm.drush.inc:1229
    0.6024   67938664  11. drush_invoke() /Users/rkoberg/drush/includes/drupal.inc:36
    0.6412   67992248  12. drush_dispatch() /Users/rkoberg/drush/includes/command.inc:38
    0.6777   70519472  13. call_user_func_array() /Users/rkoberg/drush/includes/command.inc:165
    0.6777   70519960  14. drush_command() /Users/rkoberg/drush/includes/command.inc:165
    0.6780   70524832  15. _drush_invoke_hooks() /Users/rkoberg/drush/includes/command.inc:198
    0.6790   70588976  16. call_user_func_array() /Users/rkoberg/drush/includes/command.inc:324
    0.6790   70589464  17. drush_cache_command_clear() /Users/rkoberg/drush/includes/command.inc:324
    0.6811   70657864  18. drush_op() /Users/rkoberg/drush/commands/core/cache.drush.inc:79
    0.6811   70658568  19. call_user_func_array() /Users/rkoberg/drush/includes/drush.inc:792
    0.6811   70658936  20. drush_cache_clear_both() /Users/rkoberg/drush/includes/drush.inc:792
    0.6897   70659896  21. drupal_flush_all_caches() /Users/rkoberg/drush/commands/core/cache.drush.inc:236
    2.1782   75236608  22. menu_rebuild() /Users/rkoberg/Sites/pfcc/www/includes/common.inc:7289
    2.1788   75237984  23. menu_router_build() /Users/rkoberg/Sites/pfcc/www/includes/menu.inc:2700
    2.7174   94502560  24. drupal_alter() /Users/rkoberg/Sites/pfcc/www/includes/menu.inc:2740
    2.7183   94516976  25. views_menu_alter() /Users/rkoberg/Sites/pfcc/www/includes/module.inc:1022
    2.9664  101821064  26. view->execute_hook_menu() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/views.module:349
    2.9666  101965336  27. views_plugin_display_page->execute_hook_menu() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/includes/view.inc:1352
    2.9666  101966864  28. view->init_handlers() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/plugins/views_plugin_display_page.inc:58
    2.9666  101966864  29. view->fix_missing_relationships() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/includes/view.inc:644
    2.9668  101985840  30. views_move_table() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/includes/view.inc:589
    2.9668  101985920  31. views_fetch_data() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/views.module:1506
    2.9668  101986000  32. _views_fetch_data() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/views.module:1175
    2.9672  101986304  33. module_invoke_all() /Users/rkoberg/Sites/pfcc/www/sites/all/modules/views/includes/cache.inc:30
    2.9687  102213240  34. call_user_func_array() /Users/rkoberg/Sites/pfcc/www/includes/module.inc:823
    2.9687  102213608  35. efq_views_views_data() /Users/rkoberg/Sites/pfcc/www/includes/module.inc:823

Drush command terminated abnormally due to an unrecoverable error.                                                      [error]
Error: Unsupported operand types in /Users/rkoberg/Sites/pfcc/www/sites/all/modules/efq_views/efq_views.views.inc, line
20
The external command could not be executed due to an application error.                                                 [error]
Backups were restored successfully. 

Comments

chx’s picture

Status: Active » Fixed

This has been fixed however are you sure you had entity API installed?

RobKoberg’s picture

I had/have version 7.x-1.0-rc3 installed. I still get the fatal error using drush (maybe not propagated yet?). Is the entity api release candidate not appropriate, i.e. should it be dev?

chx’s picture

Hrm, using drush? Did you do a git update or something?

RobKoberg’s picture

No. It is a relatively new site (less than two weeks old). Everything was downloaded via drush and I have been doing regular 'drush up's. No git involved in any way. I will try to track down the bug now.

Btw, now I am getting the following from a drush up:

Code updates will be made to the following projects: EntityFieldQuery Views Backend [efq_views-7.x-1.x-dev]

Note: A backup of your project will be stored to backups directory if it is not managed by a supported version control system.
Note: If you have made any modifications to any file that belongs to one of these projects, you will have to migrate those modifications after updating.
Do you really want to continue with the update process? (y/n): y
File efq_views-7.x-1.x-dev.tar.gz is corrupt (wrong md5 checksum). [error]
Updating project efq_views failed. Attempting to roll back to previously installed version. [error]
Backups were restored successfully.

RobKoberg’s picture

OK, I see the problem. Not really sure what a fix would be, however. At line 320, there is:

function _efq_views_get_property_data($entity_type, $info) {
  $metadata = entity_get_property_info($entity_type);
  // No metadata available for this entity type.
  if (!isset($metadata['properties'])) {
    return $data;
  }
...

The $metadata is always coming back as an empty array (as shown by dpm()). Since that is the case, the function tries to return and undefined variable $data. Perhaps just initialize $data as an array? But perhaps entity_get_property_info($entity_type) *should* be returning something and the bug is there?

RobKoberg’s picture

Hi again, I modified the problem function like so:

function _efq_views_get_property_data($entity_type, $info) {
  $metadata = entity_get_property_info($entity_type);
  // No metadata available for this entity type.
  if (!isset($metadata['properties'])) {
    //return $data;
    return array();
  }

Trying a test view for field_collections and the with nodes, gives the following strict warnings:

    Strict warning: Declaration of efq_views_plugin_query::get_result_entities() should be compatible with that of views_plugin_query::get_result_entities() in require_once() (line 4 of /Users/rkoberg/Sites/pfcc/www/sites/all/modules/efq_views/efq_views_plugin_query.inc).
    Strict warning: Declaration of efq_views_plugin_query::get_result_entities() should be compatible with that of views_plugin_query::get_result_entities() in require_once() (line 4 of /Users/rkoberg/Sites/pfcc/www/sites/all/modules/efq_views/efq_views_plugin_query.inc).
holtzermann17’s picture

As a related point,

drush -y dl efq_views
There is no recommended release for project efq_views.
Choose one of the available releases for project efq_views:
 [0]  :  Cancel                                         
 [1]  :  7.x-1.x-dev     -  2012-May-28  -  Development 
 [2]  :  7.x-1.0-alpha1  -  2012-May-27  -  Supported   

Cancelled

Could a maintainer please specify that 7.x-1.x-dev should be the "recommended release" (since it doesn't have the line 20 error)?

RobKoberg’s picture

Part of the problem is turning out to be UUID. After running across a similar problem with rules, it turned out that UUID is the problem. (I think it is related or similar to: http://drupal.org/node/1423234#comment-5699286)

After disabling UUID, efq_views installed without problem. However, creating a simple test view with efq nodes, I still get the strict warnings:

    Strict warning: Declaration of efq_views_plugin_query::get_result_entities() should be compatible with that of views_plugin_query::get_result_entities() in require_once() (line 4 of /Users/rkoberg/Sites/pfcc/www/sites/all/modules/efq_views/efq_views_plugin_query.inc).
    Strict warning: Declaration of efq_views_plugin_query::get_result_entities() should be compatible with that of views_plugin_query::get_result_entities() in require_once() (line 4 of /Users/rkoberg/Sites/pfcc/www/sites/all/modules/efq_views/efq_views_plugin_query.inc).

Status: Fixed » Closed (fixed)

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