From 10eed7b016e521d92847dac8245c08efc1bbbdf8 Mon Sep 17 00:00:00 2001 From: bernardhanna Date: Tue, 5 Aug 2025 16:11:52 +0100 Subject: [PATCH 1/2] fixed online_kurse --- resources/lang/de/event.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lang/de/event.php b/resources/lang/de/event.php index 405d82b71..36aee0159 100644 --- a/resources/lang/de/event.php +++ b/resources/lang/de/event.php @@ -11,7 +11,8 @@ | as the size rules. Feel free to tweak each of these messages here. | */ - 'banner-section' => 'Banner-Sektion', + 'if-no-clear-information-provide-estimate' => 'Wenn keine klaren Informationen vorliegen, gib eine Schätzung ab.', + 'banner-section' => 'Banner-Sektion', 'add-your-codeweek-activity' => 'Code Week-Aktivität eintragen', 'edit-your-codeweek-activity' => 'Code Week-Aktivität bearbeiten', 'join-the-community' => 'Werde Teil der Community', @@ -298,5 +299,4 @@ 'view-activity' => 'Aktivität ansehen', 'add-another-activity' => 'Weitere Aktivität hinzufügen', 'image-attached' => 'Image Attached', - 'if-no-clear-information-provide-estimate' => 'Wenn keine klaren Informationen vorliegen, gib eine Schätzung ab.' ]; From 3429f37a373d32b16ba2f26f13d08ff05620fe81 Mon Sep 17 00:00:00 2001 From: stevan Date: Wed, 13 Aug 2025 16:41:07 +0200 Subject: [PATCH 2/2] Fix issue RSS use old theme ids --- app/Console/Commands/api/GermanTraits.php | 31 ++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/app/Console/Commands/api/GermanTraits.php b/app/Console/Commands/api/GermanTraits.php index 47183fd28..696fc5e27 100644 --- a/app/Console/Commands/api/GermanTraits.php +++ b/app/Console/Commands/api/GermanTraits.php @@ -4,6 +4,7 @@ use App\Event; use App\Tag; +use App\Theme; use App\User; use Illuminate\Support\Arr; use Illuminate\Support\Facades\Log; @@ -134,7 +135,10 @@ private function createGermanEvent($city): void $event->audiences()->attach(explode(',', $this->audience)); } if ($this->themes) { - $event->themes()->attach(explode(',', $this->themes)); + $validThemeIds = $this->validateThemes($this->themes); + if (count($validThemeIds) > 0 ) { + $event->themes()->attach($validThemeIds); + } } if ($this->tags) { @@ -151,5 +155,30 @@ private function createGermanEvent($city): void $event->tags()->sync($tagsArray); } } + + protected function validateThemes(string $input): array + { + if (empty($input)) { + return []; + } + + $themeIds = array_unique(array_filter(array_map('trim', explode(',', $input)))); + + // Mapping deleted old id to new id group + $themeIdMapping = [ + 7 => 6, + 10 => 9, + 12 => 1, + 15 => 16, + ]; + + $mappedThemeIds = array_map(function ($id) use ($themeIdMapping) { + return $themeIdMapping[$id] ?? $id; + }, $themeIds); + + $validThemeIds = Theme::whereIn('id', $mappedThemeIds)->pluck('id')->toArray(); + + return $validThemeIds; + } }