diff --git a/core/modules/help/help.api.php b/core/modules/help/help.api.php index 6bfe106..ed2dd0c 100644 --- a/core/modules/help/help.api.php +++ b/core/modules/help/help.api.php @@ -58,7 +58,7 @@ function hook_help($route_name, \Drupal\Core\Routing\RouteMatchInterface $route_ /** * Perform alterations on help page section plugin definitions. * - * Sections for the admin/help page are provided by plugins. This hook allows + * Sections for the page at admin/help are provided by plugins. This hook allows * modules to alter the plugin definitions. * * @param array $info diff --git a/core/modules/tour/src/Plugin/HelpSection/TourHelpSection.php b/core/modules/tour/src/Plugin/HelpSection/TourHelpSection.php index 7c7670f..9ef44e3 100644 --- a/core/modules/tour/src/Plugin/HelpSection/TourHelpSection.php +++ b/core/modules/tour/src/Plugin/HelpSection/TourHelpSection.php @@ -99,8 +99,15 @@ public function listTopics() { $routes = $entity->getRoutes(); $made_link = FALSE; foreach ($routes as $route) { - // Some routes require parameters, and will generate exceptions. Use - // a try/catch loop to skip over these ones to find one that will work. + // Some tours are for routes with parameters. For instance, there is + // currently a tour in the Language module for the language edit page, + // which appears on all pages with URLs like: + // /admin/config/regional/language/edit/LANGCODE. + // There is no way to make a link to the page that displays the tour, + // because it is a set of pages. The easiest way to detect this is to + // use a try/catch exception -- try to make a link, and it will error + // out with a missing parameter exception if the route leads to a set + // of pages instead of a single page. try { $params = isset($route['route_params']) ? $route['route_params'] : []; $url = Url::fromRoute($route['route_name'], $params);