Help link broken on Modules page

Created on 27 March 2025, about 1 month ago

Problem/Motivation

When clicking on the "Help" link on /admin/modules the link goes to an error page.

Steps to reproduce

  1. Install Project Browser as normal.
  2. Go to /admin/modules of your site.
  3. Search for Project Browser
  4. Click on Help link
  5. Message displayed is as follows: "The website encountered an unexpected error. Try again later."
🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇺🇸United States anthonyroundtree

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

Comments & Activities

  • Issue created by @anthonyroundtree
  • First commit to issue fork.
  • @bhumikavarshney opened merge request.
  • 🇮🇳India Kanchan Bhogade

    Hi
    I have tested issue on Drupal 11.x

    Testing steps:

    1. Install Project Browser as normal.
    2. Go to /admin/modules of your site.
    3. Search for Project Browser
    4. Click on Help link, , issue reprodused
    5. Applied MR and check for the same

    After applied MR, the Help link broken on Modules page.

    Attaching screenshot

    Moving to Needs work

  • 🇺🇸United States chrisfromredfin Portland, Maine

    The issue here is line 24 of project_browser.module which is using Url::fromRoute to link to a route which now requires a parameter.

    I think the right thing here is to instead iterate over all enabled sources, and generate a link to each one:

          $output .= '<dd>' . t('Users who have the <em>Administer modules</em> can browse modules from the <a href=":project_browser_admin">Browse projects page</a>.', [':project_browser_admin' => Url::fromRoute('project_browser.browse', [])->toString()]) . '</dd>';
    

    So it says something like:

    Users who have the Administer modules ^permission can browse projects from the Extend section:

    • Contrib modules
    • Recipes

    Something like that.

Production build 0.71.5 2024