diff --git a/core/lib/Drupal/Core/Menu/LocalTaskManager.php b/core/lib/Drupal/Core/Menu/LocalTaskManager.php index cfd91e1..b9c7895 100644 --- a/core/lib/Drupal/Core/Menu/LocalTaskManager.php +++ b/core/lib/Drupal/Core/Menu/LocalTaskManager.php @@ -274,7 +274,9 @@ public function getTasksBuild($current_route_name) { // The request is injected, so we need to verify that we have the // expected _raw_variables attribute. $raw_variables_bag = $this->request->attributes->get('_raw_variables'); - $raw_variables = $raw_variables_bag ? $raw_variables_bag->all() : array(); + // If we don't have _raw_variables, we assume the attributes are + // still the original values. + $raw_variables = $raw_variables_bag ? $raw_variables_bag->all() : $this->request->attributes->all(); $active = array_intersect_assoc($route_parameters, $raw_variables) == $route_parameters; } // The plugin may have been set active in getLocalTasksForRoute() if