diff --git a/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php index 933db95..c1474de 100644 --- a/core/modules/system/src/Form/ModulesListForm.php +++ b/core/modules/system/src/Form/ModulesListForm.php @@ -226,7 +226,6 @@ protected function buildRow(array $modules, Extension $module, $distribution) { // Generate link for module's help page. Assume that if a hook_help() // implementation exists then the module provides an overview page, rather // than checking to see if the page exists, which is costly. - $row['links']['help'] = array(); if ($this->moduleHandler->moduleExists('help') && $module->status && in_array($module->getName(), $this->moduleHandler->getImplementations('help'))) { $row['links']['help'] = array( '#type' => 'link', @@ -237,7 +236,6 @@ protected function buildRow(array $modules, Extension $module, $distribution) { } // Generate link for module's permission, if the user has access to it. - $row['links']['permissions'] = array(); if ($module->status && $this->currentUser->hasPermission('administer permissions') && $this->permissionHandler->moduleProvidesPermissions($module->getName())) { $row['links']['permissions'] = array( '#type' => 'link', @@ -248,7 +246,6 @@ protected function buildRow(array $modules, Extension $module, $distribution) { } // Generate link for module's configuration page, if it has one. - $row['links']['configure'] = array(); if ($module->status && isset($module->info['configure'])) { $route_parameters = isset($module->info['configure_parameters']) ? $module->info['configure_parameters'] : array(); if ($this->accessManager->checkNamedRoute($module->info['configure'], $route_parameters, $this->currentUser)) { diff --git a/core/modules/system/system.admin.inc b/core/modules/system/system.admin.inc index a09a6fa..e8c27c8 100644 --- a/core/modules/system/system.admin.inc +++ b/core/modules/system/system.admin.inc @@ -239,7 +239,9 @@ function template_preprocess_system_modules_details(&$variables) { $links = []; foreach (['help', 'permissions', 'configure'] as $link_type) { - $links[] = $module['links'][$link_type]; + if (isset($module['links'][$link_type])) { + $links[] = $module['links'][$link_type]; + } } $module['links'] = $links; diff --git a/core/modules/system/templates/system-modules-details.html.twig b/core/modules/system/templates/system-modules-details.html.twig index 5bbc1d3..114e2c3 100644 --- a/core/modules/system/templates/system-modules-details.html.twig +++ b/core/modules/system/templates/system-modules-details.html.twig @@ -28,17 +28,17 @@ * @ingroup themeable */ #} - +
- {{ header.installed }} + {{- header.installed -}} - {{ header.name }} + {{- header.name -}} - {{ header.description }} + {{- header.description -}}