Skip to content
Snippets Groups Projects

Add module name to uninstall

Open nicxvan requested to merge issue/drupal-3250376:3250376-uninstall-page-shows into 11.x
1 unresolved thread

Closes #3250376

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
199 200 // we can allow this module to be uninstalled.
200 201 foreach (array_keys($module->required_by) as $dependent) {
201 202 if ($this->updateRegistry->getInstalledVersion($dependent) !== $this->updateRegistry::SCHEMA_UNINSTALLED) {
202 $form['modules'][$module->getName()]['#required_by'][] = $dependent;
203 $module_name = $modules[$dependent]->info['name'];
204 if ($dependent != strtolower(str_replace(' ', '_', $module_name))) {
  • Why are we comparing by converting the machine name to human human-readable name here by replacing spaces with hyphens? I think this condition could be replaced with

    if ($dependent != $modules[$dependent]->getName()) {

  • Author Developer

    They will almost never be equal Views UI does not equal views_ui but we don't need to show Views UI (views_ui)

  • Yes, in that case, the change I suggested should work properly.

  • Author Developer

    What do you mean? The proposal was to only show the module's machine name if it is materially different. Meaning the differences are more than spaces and capitalization.

    Your suggestion would display: Views UI (views_ui)the code I wrote displays only Views UI.

  • Please register or sign in to reply
  • David Cameron added 135 commits

    added 135 commits

    Compare with previous version

  • Please register or sign in to reply
    Loading