Scenario is the following:
- Drupal gets to bootstrap full
- Menu set custom theme is called
- The loaded page doesn't exist -> menu.inc tries to rebuild menu
if (variable_get('menu_rebuild_needed', FALSE) || !variable_get('menu_masks', array())) {
menu_rebuild();
}
- The menu rebuild escalates to entity info load
- At this point entity.info.inc is not loaded (probably because nothing was using the classes defined there
- Because of this - entity_entity_property_info() is not defined
- Entity info is not gonna be complete
- Workflow module happen to rely on some properties and ends with fatal error:
Fatal error: Unsupported operand types in sites/all/modules/contrib/workflow/workflow.entity.inc on line 165
Call Stack:
0.0009 258448 1. {main}() drush/drush.php:0
0.0310 2480072 2. drush_main() drush/drush.php:16
0.3070 8127336 3. Drush\Boot\DrupalBoot->bootstrap_and_dispatch() drush/drush.php:76
0.3076 8135224 4. drush_bootstrap_to_phase() drush/lib/Drush/Boot/DrupalBoot.php:35
0.3076 8135296 5. drush_bootstrap_max() drush/lib/Drush/Boot/bootstrap.inc:291
0.3676 6776704 6. drush_bootstrap() drush/lib/Drush/Boot/bootstrap.inc:345
0.3677 6778088 7. _drush_bootstrap_drupal_full() drush/lib/Drush/Boot/bootstrap.inc:186
0.3677 6795240 8. drupal_bootstrap() drush/lib/Drush/Boot/bootstrap.inc:685
0.4118 10478904 9. _drupal_bootstrap_full() includes/bootstrap.inc:2303
0.6800 30999184 10. menu_set_custom_theme() includes/common.inc:5208
0.6800 30999344 11. menu_get_custom_theme() includes/menu.inc:1770
0.6811 31004896 12. menu_get_item() includes/menu.inc:1755
0.6811 31005392 13. menu_rebuild() includes/menu.inc:459
0.6882 31047584 14. menu_router_build() includes/menu.inc:2722
1.0151 41991456 15. drupal_alter() includes/menu.inc:2762
1.0287 42726104 16. views_menu_alter() includes/module.inc:1101
1.0287 42726536 17. views_get_applicable_views() sites/all/modules/contrib/views/views.module:397
1.0287 42726704 18. views_get_all_views() sites/all/modules/contrib/views/views.module:1388
1.0287 42726880 19. ctools_export_crud_load_all() sites/all/modules/contrib/views/views.module:1431
1.0287 42726928 20. ctools_export_load_object() sites/all/modules/contrib/ctools/includes/export.inc:148
1.0293 42734848 21. _ctools_export_get_defaults() sites/all/modules/contrib/ctools/includes/export.inc:496
1.0401 43593952 22. node_views_default_views() sites/all/modules/contrib/ctools/includes/export.inc:680
1.0455 44081632 23. views_db_object->new_display() sites/all/modules/contrib/views/modules/node.views_default.inc:25
1.0455 44081728 24. views_db_object->add_display() sites/all/modules/contrib/views/includes/view.inc:2419
1.0455 44081840 25. views_fetch_plugin_data() sites/all/modules/contrib/views/includes/view.inc:2323
1.0460 44114280 26. _views_fetch_plugin_data() sites/all/modules/contrib/views/views.module:1255
1.0634 45494496 27. views_discover_plugins() sites/all/modules/contrib/views/includes/cache.inc:134
1.0663 45573192 28. entity_views_plugins() sites/all/modules/contrib/views/includes/plugins.inc:414
1.0669 45573456 29. views_fetch_data() sites/all/modules/contrib/entity/views/entity.views.inc:320
1.0669 45573768 30. _views_fetch_data() sites/all/modules/contrib/views/views.module:1244
1.0674 45574880 31. _views_fetch_data_build() sites/all/modules/contrib/views/includes/cache.inc:76
1.0674 45574960 32. module_invoke_all() sites/all/modules/contrib/views/includes/cache.inc:91
1.0722 45633528 33. call_user_func_array:{includes/module.inc:895}() includes/module.inc:895
1.0722 45633840 34. entity_views_data() includes/module.inc:895
1.0804 46268984 35. EntityDefaultViewsController->views_data() sites/all/modules/contrib/entity/views/entity.views.inc:33
1.0805 46271288 36. EntityDefaultViewsController->schema_fields() sites/all/modules/contrib/entity/views/entity.views.inc:387
1.0806 46271632 37. entity_get_property_info() sites/all/modules/contrib/entity/views/entity.views.inc:445
1.0815 46272696 38. drupal_alter() sites/all/modules/contrib/entity/includes/entity.property.inc:39
1.0820 46274944 39. workflow_entity_property_info_alter() includes/module.inc:1101
It looks like a special case, however end with a white page instead of a page-not-found. (This happens through drush and browser too.)
What do you think is the real issue here? Is it that Workflow is expecting a complete entity definition or we rely on the class autoloader to load the functions from entity.info.inc? What would you recommend the solution could be?
Btw, the final fatal error trigger in workflow is:
$info['Workflow']['properties']['tab_roles'] += array(
And here the properties subarray is not complete due to the missing entity_entity_property_info function.
Thanks for the help in advance!
Comment | File | Size | Author |
---|---|---|---|
#8 | 2414515-8.patch | 517 bytes | mbaynton |
| |||
#3 | entity-info-inc-missing-at-bootstrap-2414515-3.patch | 617 bytes | mbaynton |
Comments
Comment #1
Håvard CreditAttribution: Håvard commentedI have the same issue with Workflow :/
Comment #2
Håvard CreditAttribution: Håvard commented[duplicate]
Comment #3
mbayntonI don't believe this is a more complex issue than "entity.property.inc depends on entity.info.inc for proper operation, and so should ensure it is loaded." The attached patch makes this the case.
Comment #4
mbayntonComment #6
natew CreditAttribution: natew commentedI ran into this same issue and the patch in #3 fixed this for me.
Comment #7
varghese CreditAttribution: varghese as a volunteer commentedI reviewed the #3 patch code style found nothing to improve.
Comment #8
mbayntonPatches that apply are always better
Comment #9
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 3 year old patch in #8 to entity.property.inc applied cleanly to the latest entity 7.x-1.x-dev and already has two community reviews so changing to RTBC.