diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php index e38132c..5fb2973 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayTest.php @@ -242,8 +242,8 @@ public function testInvalidDisplayPlugins() { $this->assertResponse(200); $this->assertText(t('The plugin (invalid) did not specify an instance class.')); - // Rebuild the menu, and ensure that the path is not accessible anymore. - menu_router_rebuild(); + // Rebuild the router, and ensure that the path is not accessible anymore. + views_invalidate_cache(); $this->drupalGet('test_display_invalid'); $this->assertResponse(404); diff --git a/core/modules/views/views.module b/core/modules/views/views.module index d8e0712..c238f4f 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -312,9 +312,6 @@ function views_permission() { * Implement hook_menu(). */ function views_menu() { - // Any event which causes a menu rebuild could potentially mean that the - // Views data is updated -- module changes, profile changes, etc. - views_invalidate_cache(); $items = array(); $items['views/ajax'] = array( 'title' => 'Views',