Uninstall page shows module machine names as requirements

Created on 19 November 2021, over 3 years ago
Updated 4 February 2023, about 2 years ago

Problem/Motivation

The module uninstall page shows machine names rather than human readable names for module dependencies. This is OK in most cases but very confusing in some cases - for example Language module shows as

Allows users to configure available languages.
The following reason prevents Language from being uninstalled:
Required by: locale

But then I look for "locale" module and can't find it in the list - this is because its human readable name is "Interface Translation". There is nothing on the page that gives me a clue that I need to uninstall Interface Translation first if I want to uninstall Language.

Steps to reproduce

Proposed resolution

Show the human readable name instead of the machine name for module requirements on the uninstall page.

Remaining tasks

User interface changes

The human readable name will be displayed instead of the module machine name.

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Postponed: needs info

Version

10.1

Component
Extension 

Last updated about 14 hours ago

No maintainer
Created by

🇬🇧United Kingdom longwave UK

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • 🇬🇧United Kingdom jonathan1055

    Yes 🐛 Modules uninstall filter does not filter by machine name Needs work would clash with this. Though that change will help this situation. To take the example in the issue summary - uninstalling Language

    With the change in that other issue we can now search for 'locale' to find the module Interface Translation

    So we could add the readable name into the "required by" as that might be useful for those whose interface is not English (particularly appropriate in this example). But we should definitely not remove the machine name.

  • Status changed to Active 7 months ago
  • 🇳🇿New Zealand quietone

    Reading through this issue and 🐛 Modules uninstall filter does not filter by machine name Needs work I think this can be worked on.

  • First commit to issue fork.
  • Merge request !10963Add module name to uninstall → (Open) created by nicxvan
  • 🇺🇸United States nicxvan

    This seems pretty straightforward and seems helpful also for CMS.

    I converted the patch to an MR.

  • Pipeline finished with Success
    3 months ago
    Total: 485s
    #401273
  • 🇺🇸United States smustgrave

    Before

    After

    Attaching before/after screenshots to show this is working. Seems like a small enough tweak I don't know if tests are fully needed so going to move it forward.

  • 🇬🇧United Kingdom jonathan1055

    In #12 I said

    ... add the readable name into the "required by" as that might be useful ... but we should definitely not remove the machine name.

    I think this needs to be discussed. I did something like this elsewhere, and the the solution we came to was to always show the readable name, but then add the machine name in parenthesis only if it was different. By 'different' I mean, ignore case, ignore word breaks and _ and if the string is still different the show it. That would mean we see "Interface Translation (locale)" but for things like Block Content you would not add (block_content). If I recall, there was only a few where the name differed, but for thos few it was very useful to see both.

  • 🇳🇿New Zealand quietone

    This is changing the UI so tagging for Usability and, as such, screenshots should be available to reviewers and committers from the Issue Summary.

    The comment in #12/#19 still needs to be addressed but adding more details is expanding the scope of this issue. I think that should be in another issue. And while #8 is right that the machine name is removed, it is overall, an improvement for users of the uninstall page. This is a acceptable incremental step to improving the page for the user.

    I do think this should be tested so there is no regression. There are many sibling issues which will be changing the text on the uninstall page so we should test as we go along. There is an existing test for the uninstall page, so hopefully, this will be straightforward,
    \Drupal\Tests\system\Functional\Module\UninstallTest::testUninstallPage

  • Status changed to Needs work 1 day ago
  • First commit to issue fork.
  • Pipeline finished with Failed
    1 day ago
    Total: 844s
    #478126
  • Pipeline finished with Success
    1 day ago
    Total: 553s
    #478135
  • 🇺🇸United States dcam

    I added an assertion.

    FWIW, as a site builder and admin my preference is to see both. If I want or need to switch to Drush, then I don't want to have to go hunting for a module's machine name.

  • 🇮🇳India shivam_tiwari

    I checked MR and applied it as a patch. Now we can see module's human readable name in place of module's machine name on the module uninstall page. There is not any pipeline failure and test cases issue with MR so moving it to RTBC,
    Adding screenshots of uninstall page related to my testing here.

  • 🇬🇧United Kingdom jonathan1055

    There is a 'test-only changes' job which needs to be run and it should fail.

  • 🇺🇸United States nicxvan

    12 and 19 still haven't been addressed, I'm working on this now so assigning myself since there have been a few contributors recently.

  • 🇺🇸United States dcam

    12 and 19 still haven't been addressed...

    Yeah, I wasn't sure if action should be taken to display both or not. It isn't clear. If we're displaying both, then the issue summary needs to be updated.

  • Pipeline finished with Failed
    about 17 hours ago
    Total: 130s
    #478435
  • 🇺🇸United States nicxvan

    Ok I've pushed it up, I've attached a screenshot of the before and after

  • Pipeline finished with Success
    about 16 hours ago
    Total: 520s
    #478438
  • 🇮🇳India prashant.c Dharamshala

    I have struggled with this a lot while uninstalling a module from the UI, it confuses when the name of the module is totally different from its machine name; you mostly go back and double-check it.

    Having this added to the core would be very helpful to the site builders.

Production build 0.71.5 2024