diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 7d1c8ff..e30953d 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -322,7 +322,7 @@ function views_menu() { */ function views_menu_alter(&$callbacks) { $our_paths = array(); - $views = views_get_applicable_views('path'); + $views = views_get_applicable_views('uses_hook_menu'); foreach ($views as $data) { list($view, $display_id) = $data; $result = $view->executeHookMenu($display_id, $callbacks); @@ -1109,9 +1109,13 @@ function views_get_enabled_display_extenders() { function views_get_applicable_views($type) { $result = array(); + $map = array( + 'uses_hook_menu' => 'path', + ); + $option_type = isset($map[$type]) ? $map[$type] : ''; $query = drupal_container()->get('entity.query')->get('view') ->condition('disabled', '0') - ->condition("display.*.display_options.$type", NULL, 'IS NOT NULL') + ->condition("display.*.display_options.$option_type", NULL, 'IS NOT NULL') ->execute(); foreach (drupal_container()->get('plugin.manager.entity')->getStorageController('view')->load($query) as $view) { @@ -1119,7 +1123,7 @@ function views_get_applicable_views($type) { $executable = $view->get('executable'); $executable->initDisplay(); foreach ($executable->displayHandlers as $id => $handler) { - if ($handler->isEnabled()) { + if (!empty($handler->definition[$type]) && $handler->isEnabled()) { $result[] = array($executable, $id); } }