diff --git a/core/modules/views/views.module b/core/modules/views/views.module index b3a4c26..7dce487 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -828,11 +828,15 @@ function views_hook_info() { 'group' => 'views', ); - // Register a views_plugins alter hook for all plugin types. - foreach (ViewExecutable::getPluginTypes() as $type) { - $hooks['views_plugins_' . $type . '_alter'] = array( - 'group' => 'views', - ); + // During installation the moduleHandler might call hook_hook_info without + // having the classloader setup properly. + if (class_exists('Drupal\\views\\ViewExecutable')) { + // Register a views_plugins alter hook for all plugin types. + foreach (ViewExecutable::getPluginTypes() as $type) { + $hooks['views_plugins_' . $type . '_alter'] = array( + 'group' => 'views', + ); + } } $hooks['views_query_substitutions'] = array(