Module filters don't work as described - part-words do not match and first word of description is ignored

Created on 20 October 2022, over 2 years ago
Updated 20 May 2025, 3 days ago

Problem/Motivation

Go to admin/modules and try entering the following in the filter. In all cases, 'Shortcut' module should show.

- 'short' - works
- 'links' - works
- 'cut' - nope
- 'allows' - nope, but weirdly shows OTHER modules with that word in their description. Case-sensitive maybe??
- 'mizable' - nope

The same happens on admin/modules/uninstall, where there is an explicit "Enter a part of the module name or description" UI text.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

system.module

Created by

🇬🇧United Kingdom joachim

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.

  • 🇦🇺Australia mstrelan

    I couldn't reproduce the "allows" scenario but all the others I can.

    Here is the relevant code in core/modules/system/js/system.modules.js:

    // Case insensitive expression to find query at the beginning of a word.
    const re = new RegExp(`\\b${query}`, 'i');

    It's easy enough to remove \\b but it looks like it was pretty intentional. If you remove it you will find "contextual links" when searching for "text" which is arguably worse. I don't see a compelling reason to change it at this point, perhaps the help text could be made clearer.

  • 🇬🇧United Kingdom joachim

    Yup, 'allows' works now, so updating the IS.

    > I don't see a compelling reason to change it at this point, perhaps the help text could be made clearer.

    The help text is completely wrong!

    I would say that this is obsolete because of Create Javascript library for searching rendered lists on the client. Active but that has been stalled for a very long time.

  • 🇦🇺Australia mstrelan

    The help text is completely wrong!

    It's not completely wrong. The help text says "Enter a part of the module name or description". If you enter "translation" you get "content translation", so that is correct, you entered part of the module name.

    I would say that this is obsolete because of Create Javascript library for searching rendered lists on the client. Active but that has been stalled for a very long time.

    How about we make this issue about making the help text align with the current reality, and if any functional changes are needed we address them in that issue?

Production build 0.71.5 2024