From 5b58e40fc90ad8519d94ebe1be1b6fb29ef85ebd Mon Sep 17 00:00:00 2001 From: odain Date: Sun, 8 Feb 2026 20:34:40 +0100 Subject: [PATCH] =?UTF-8?q?N=C2=B08760=20-=20fix=20installation=20choices?= =?UTF-8?q?=20db=20query=20-=20read=20code=20instead=20of=20title=20+=20ad?= =?UTF-8?q?d=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/extensionsmap.class.inc.php | 2 +- setup/feature_removal/DryRemovalRuntimeEnvironment.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/setup/extensionsmap.class.inc.php b/setup/extensionsmap.class.inc.php index 9b145ffd6..89d169499 100644 --- a/setup/extensionsmap.class.inc.php +++ b/setup/extensionsmap.class.inc.php @@ -577,7 +577,7 @@ class iTopExtensionsMap $aChoices = []; foreach ($aDBInfo as $aExtensionInfo) { - $aChoices[] = $aExtensionInfo['label']; + $aChoices[] = $aExtensionInfo['code']; } return $aChoices; diff --git a/setup/feature_removal/DryRemovalRuntimeEnvironment.php b/setup/feature_removal/DryRemovalRuntimeEnvironment.php index 22a7286e1..25b28fc52 100644 --- a/setup/feature_removal/DryRemovalRuntimeEnvironment.php +++ b/setup/feature_removal/DryRemovalRuntimeEnvironment.php @@ -57,7 +57,12 @@ class DryRemovalRuntimeEnvironment extends RunTimeEnvironment $aModulesToLoad = $this->GetModulesToLoad($sSourceEnv, $aSearchDirs); - ModuleDiscovery::GetModulesOrderedByDependencies($aSearchDirs, true, $aModulesToLoad); + try { + ModuleDiscovery::GetModulesOrderedByDependencies($aSearchDirs, true, $aModulesToLoad); + } catch (\MissingDependencyException $e) { + \IssueLog::Error("Cannot prepare setup due to dependency issue", null, ['msg' => $e->getMessage(), 'modules_to_load' => $aModulesToLoad]); + throw $e; + } } private function DeclareExtensionAsRemoved(array $aExtensionCodes): void