diff --git a/ProcessMaker/Models/Setting.php b/ProcessMaker/Models/Setting.php index 3f36942a3d..e6167a2517 100644 --- a/ProcessMaker/Models/Setting.php +++ b/ProcessMaker/Models/Setting.php @@ -430,6 +430,7 @@ function ($settings) use ($id) { public static function updateAllSettingsGroupId() { Setting::whereNull('group_id')->chunk(100, function ($settings) { + $defaultId = SettingsMenus::EMAIL_MENU_GROUP; foreach ($settings as $setting) { // Define the value of 'menu_group' based on 'group' switch ($setting->group) { @@ -466,7 +467,11 @@ public static function updateAllSettingsGroupId() $id = null; break; default: // The default value - $id = SettingsMenus::getId(SettingsMenus::EMAIL_MENU_GROUP); + if (preg_match('/^Email Server/', $setting->group)) { + $id = SettingsMenus::getId(SettingsMenus::EMAIL_MENU_GROUP); + } else { + $id = SettingsMenus::getId($defaultId); + } break; } if ($id !== null) {