diff --git a/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php b/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php index baad5a9d7f4af2b2e10168ff9fc82dc9b6e02350..304532377f1cc8dab6ec7d051ad4baea1097f690 100644 --- a/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php +++ b/admin_toolbar_tools/src/Plugin/Derivative/ExtraLinks.php @@ -486,7 +486,7 @@ class ExtraLinks extends DeriverBase implements ContainerDeriverInterface { // If module Update Manager is enabled. if ($this->moduleHandler->moduleExists('update')) { - if (version_compare(\Drupal::VERSION, '11.0.0', '<')) { + if (version_compare(\Drupal::VERSION, '11.0.0', '<') && $this->routeExists('update.module_install')) { $links['update.module_install'] = [ 'title' => $this->t('Install new module'), 'route_name' => 'update.module_install', @@ -498,7 +498,7 @@ class ExtraLinks extends DeriverBase implements ContainerDeriverInterface { 'route_name' => 'update.module_update', 'parent' => 'system.modules_list', ] + $base_plugin_definition; - if (version_compare(\Drupal::VERSION, '11.0.0', '<')) { + if (version_compare(\Drupal::VERSION, '11.0.0', '<') && $this->routeExists('update.theme_install')) { $links['update.theme_install'] = [ 'title' => $this->t('Install new theme'), 'route_name' => 'update.theme_install',