diff --git a/lib/Drupal/views/Plugin/Discovery/ViewsDiscovery.php b/lib/Drupal/views/Plugin/Discovery/ViewsDiscovery.php index 7a97616080c913950a0f6cb181a99403bf099dad..fda051c4b27fa5ad8a2fde38f23ead1bf889c7e3 100644 --- a/lib/Drupal/views/Plugin/Discovery/ViewsDiscovery.php +++ b/lib/Drupal/views/Plugin/Discovery/ViewsDiscovery.php @@ -29,7 +29,9 @@ public function getDefinitions() { $theme_file = "$module.views.inc"; } - $definition['module'] = $module_dir; + if (!isset($definition['module'])) { + $definition['module'] = $module_dir; + } if (!isset($definition['theme path'])) { $definition['theme path'] = $theme_path; } diff --git a/views.module b/views.module index 508578e0eb5613f4bf12c3bda170bfcd7b8f0c1e..baf67a4f1753a70b893f86b98b2a151aaf64a971 100644 --- a/views.module +++ b/views.module @@ -1336,6 +1336,11 @@ function views_fetch_plugin_names($type, $key = NULL, $base = array()) { if ($key && (empty($plugin['type']) || $plugin['type'] != $key)) { continue; } + // @todo While Views is providing on behalf of core modules, check to see + // if they are enabled or not. + if (isset($plugin['module']) && !module_exists($plugin['module'])) { + continue; + } if (empty($plugin['no ui']) && (empty($base) || empty($plugin['base']) || array_intersect($base, $plugin['base']))) { $plugins[$id] = $plugin['title'];