When doing a registry rebuild with drush, I sometimes get this fatal error:

Fatal error: Class 'ctools_export_ui' not found in /some_site/www/sites/all/modules/contrib/facetapi/contrib/current_search/plugins/export_ui/current_search_export_ui.class.php on line 11

Full stack trace:

Call Stack:
    0.0020     695024   1. {main}() /some_site/scripts/drush/drush.php:0
    0.0408    4790912   2. drush_main() /some_site/scripts/drush/drush.php:14
    0.1282   10694416   3. _drush_bootstrap_and_dispatch() /some_site/scripts/drush/drush.php:59
    0.1617   10702344   4. drush_dispatch() /some_site/scripts/drush/drush.php:90
    0.2191   10712320   5. call_user_func_array() /some_site/scripts/drush/includes/command.inc:165
    0.2191   10712568   6. drush_registry_rebuild() /some_site/scripts/drush/includes/command.inc:165
    2.7073   80690600   7. registry_rebuild() /some_site/scripts/drush/commands/registry_rebuild.drush.inc:123
    2.7074   80690600   8. registry_update() /some_site/www/includes/bootstrap.inc:3125
    2.7080   80690800   9. _registry_update() /some_site/www/includes/bootstrap.inc:3153
    2.7307   84492784  10. drupal_alter() /some_site/www/includes/registry.inc:70
    2.7318   84540376  11. ctools_registry_files_alter() /some_site/www/includes/module.inc:1049
    2.7326   84564024  12. _ctools_registry_files_alter() /some_site/www/sites/all/modules/contrib/ctools/ctools.module:498
    3.1339  102543656  13. ctools_get_plugins() /some_site/www/sites/all/modules/contrib/ctools/includes/registry.inc:33
    3.1342  102546952  14. ctools_plugin_load_hooks() /some_site/www/sites/all/modules/contrib/ctools/includes/plugins.inc:264
    3.1351  102548128  15. ctools_plugin_process() /some_site/www/sites/all/modules/contrib/ctools/includes/plugins.inc:644
    3.1351  102548320  16. media_media_browser_plugin_info() /some_site/www/sites/all/modules/contrib/ctools/includes/plugins.inc:681
    3.1353  102552920  17. views_get_enabled_views() /some_site/www/sites/all/modules/contrib/media/media.module:1059
    3.1353  102552920  18. views_get_all_views() /some_site/www/sites/all/modules/contrib/views/views.module:1378
    3.1353  102553048  19. ctools_export_crud_load_all() /some_site/www/sites/all/modules/contrib/views/views.module:1371
    3.1353  102553128  20. ctools_export_load_object() /some_site/www/sites/all/modules/contrib/ctools/includes/export.inc:148
    3.1370  102568520  21. _ctools_export_get_defaults() /some_site/www/sites/all/modules/contrib/ctools/includes/export.inc:496
    3.2398  109500296  22. some_sitefo_generic_views_default_views() /some_site/www/sites/all/modules/contrib/ctools/includes/export.inc:680
    3.2398  109500464  23. some_sitefo_generic_get_defaults() /some_site/www/sites/all/modules/some_site/some_site_fo/some_sitefo_generic/views/some_sitefo_generic.views_default.inc:3
    3.2403  109557552  24. require('/some_site/www/sites/all/modules/some_site/some_site_fo/some_sitefo_generic/views/some_sitefo_generic-some_sitefo_boutique_carousel.view.inc') /some_site/www/sites/all/modules/some_site/some_site_fo/some_sitefo_generic/some_sitefo_generic.module:208
    3.2461  110371208  25. views_db_object->new_display() /some_site/www/sites/all/modules/some_site/some_site_fo/some_sitefo_generic/views/some_sitefo_generic-some_sitefo_boutique_carousel.view.inc:13
    3.2461  110371208  26. views_db_object->add_display() /some_site/www/sites/all/modules/contrib/views/includes/view.inc:2316
    3.2462  110371288  27. views_fetch_plugin_data() /some_site/www/sites/all/modules/contrib/views/includes/view.inc:2220
    3.2471  110420704  28. _views_fetch_plugin_data() /some_site/www/sites/all/modules/contrib/views/views.module:1195
    3.2883  113596408  29. views_discover_plugins() /some_site/www/sites/all/modules/contrib/views/includes/cache.inc:96
    3.2896  113617504  30. entity_views_plugins() /some_site/www/sites/all/modules/contrib/views/includes/plugins.inc:413
    3.2900  113618520  31. views_fetch_data() /some_site/www/sites/all/modules/contrib/entity/views/entity.views.inc:319
    3.2900  113618664  32. _views_fetch_data() /some_site/www/sites/all/modules/contrib/views/views.module:1184
    3.2903  113620456  33. module_invoke_all() /some_site/www/sites/all/modules/contrib/views/includes/cache.inc:29
    3.2976  113927056  34. call_user_func_array() /some_site/www/includes/module.inc:850
    3.2976  113927304  35. entity_views_data() /some_site/www/includes/module.inc:850
    4.0408  129997224  36. EntityDefaultViewsController->views_data() /some_site/www/sites/all/modules/contrib/entity/views/entity.views.inc:33
    4.0410  129999408  37. EntityDefaultViewsController->schema_fields() /some_site/www/sites/all/modules/contrib/entity/views/entity.views.inc:385
    4.0411  129999408  38. entity_get_property_info() /some_site/www/sites/all/modules/contrib/entity/views/entity.views.inc:399
    4.0414  130001088  39. module_invoke_all() /some_site/www/sites/all/modules/contrib/entity/includes/entity.property.inc:37
    4.0639  130443080  40. call_user_func_array() /some_site/www/includes/module.inc:850
    4.0639  130443328  41. entity_entity_property_info() /some_site/www/includes/module.inc:850
    4.0755  130543648  42. entity_metadata_field_entity_property_info() /some_site/www/sites/all/modules/contrib/entity/entity.info.inc:31
    4.0755  130543864  43. field_info_fields() /some_site/www/sites/all/modules/contrib/entity/modules/field.info.inc:17
    4.0755  130544080  44. _field_info_collate_fields() /some_site/www/modules/field/field.info.inc:595
    5.5903  169447288  45. module_invoke_all() /some_site/www/modules/field/field.info.inc:235
    5.5913  169452400  46. call_user_func_array() /some_site/www/includes/module.inc:850
    5.5913  169452648  47. bundleswitcher_field_extra_fields() /some_site/www/includes/module.inc:850
    5.5915  169457368  48. l() /some_site/www/sites/all/modules/contrib/bundleswitcher/bundleswitcher.module:39
    5.6112  170151432  49. theme_get_registry() /some_site/www/includes/common.inc:2429
    5.6113  170152896  50. call_user_func_array() /some_site/www/includes/theme.inc:276
    5.6113  170153512  51. _theme_load_registry() /some_site/www/includes/theme.inc:276
    5.6113  170155000  52. ThemeRegistry->__construct() /some_site/www/includes/theme.inc:334
    5.6113  170155264  53. ThemeRegistry->initializeRegistry() /some_site/www/includes/theme.inc:393
    5.6113  170155264  54. theme_get_registry() /some_site/www/includes/theme.inc:409
    5.6114  170155408  55. call_user_func_array() /some_site/www/includes/theme.inc:276
    5.6114  170155928  56. _theme_load_registry() /some_site/www/includes/theme.inc:276
    5.6117  170157000  57. _theme_build_registry() /some_site/www/includes/theme.inc:324
    6.4134  176587264  58. _theme_process_registry() /some_site/www/includes/theme.inc:686
    6.4245  176867416  59. include_once('/some_site/www/sites/all/modules/contrib/facetapi/contrib/current_search/plugins/export_ui/current_search_export_ui.class.php') /some_site/www/includes/theme.inc:563

Drush command terminated abnormally due to an unrecoverable error.                                                             [error]
Error: Class 'ctools_export_ui' not found in
/some_site/www/sites/all/modules/contrib/facetapi/contrib/current_search/plugins/export_ui/current_search_export_ui.class.php,
line 11
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amateescu’s picture

Status: Active » Needs review
FileSize
3.69 KB

The problem is that the autoloader is not ready yet and the theme registry opens a file with a class that extends ctools_export_ui which is not yet loaded.

Here's a patch for the 7.x-1.x branch, haven't checked if the problem is still there in 7.x-2.x.

cpliakas’s picture

The problem is that the autoloader is not ready yet and the theme registry opens a file with a class that extends ctools_export_ui which is not yet loaded.

Very interesting. I cannot replicate yet, but based on the wonkiness of the autoloader this seems likely. The explanation seems very reasonable as well as the fix, so I will test and RTBC as soon as I have time.

Thanks for the contribution!
Chris

cpliakas’s picture

Status: Fixed » Reviewed & tested by the community
FileSize
4.3 KB

Works for me, so marking as RTBC. Made a minor change that makes the upgrade a little more seamless in that it prevents users from having to clear the cache in order to fix a broken sort table. Not a big deal, but there are always those sites where you have to hold your breath when cache is cleared.

cpliakas’s picture

Status: Needs review » Fixed

Committed to 7.x versions of Facet API.

http://drupalcode.org/project/facetapi.git/commit/3e02d46 (7.x-1.x)
http://drupalcode.org/project/facetapi.git/commit/e8bbd65 (7.x-2.x)

Congrats on becoming the 35th code contributor to Facet API!

Status: Reviewed & tested by the community » Closed (fixed)

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