Render help page links only if help module is installed

Created on 18 January 2023, almost 2 years ago
Updated 10 October 2023, about 1 year ago

Problem/Motivation

Loading Monolog Loki admin form at /admin/config/development/monolog_loki/settings requires the route help.page, which might not be available if the module help is not installed.

Steps to reproduce

1. Uninstall help module
2. Navigate to /admin/config/development/monolog_loki/settings
3. Find following error:


Symfony\Component\Routing\Exception\RouteNotFoundException: Route "help.page" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 206 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Proposed resolution

Check if route help.page is available before rendering links to the help pages in in form descriptions

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

🇦🇹Austria guedressel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Assigned to elber
  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • Assigned to WagnerMelo
  • Issue was unassigned.
  • Status changed to RTBC almost 2 years ago
  • 🇧🇪Belgium borisson_ Mechelen, 🇧🇪

    The solution in #3 works, it adds help as a requirement and while that does make it work, I don't really agree with it.
    The other patch (#4) makes sure that the links are only added when the help module is actually installed, I think this is a much better approach, I applied #4 locally and that works perfectly.

    I don't see any functional tests in this module, so adding tests for this does not make sense at the moment.
    RTBC++

Production build 0.71.5 2024