From faaeb8c11f75339bd547c5022840f9326c7292c6 Mon Sep 17 00:00:00 2001 From: Thorsten Marx Date: Sun, 6 Oct 2024 12:15:06 +0200 Subject: [PATCH] fix message source usage of no theme is used --- cms-api/pom.xml | 2 +- cms-auth/pom.xml | 2 +- cms-content/pom.xml | 2 +- .../condation/cms/content/DefaultContentRenderer.java | 9 +++++++-- cms-core/pom.xml | 2 +- cms-extensions/pom.xml | 2 +- cms-filesystem/pom.xml | 2 +- cms-git/pom.xml | 2 +- cms-media/pom.xml | 2 +- cms-sandbox/pom.xml | 2 +- cms-server/pom.xml | 2 +- integration-tests/pom.xml | 2 +- modules-framework/api/pom.xml | 2 +- modules-framework/manager/pom.xml | 2 +- modules-framework/pom.xml | 2 +- modules/example-module/pom.xml | 2 +- modules/pom.xml | 2 +- pom.xml | 2 +- 18 files changed, 24 insertions(+), 19 deletions(-) diff --git a/cms-api/pom.xml b/cms-api/pom.xml index 68490723d..62e641bb4 100644 --- a/cms-api/pom.xml +++ b/cms-api/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 cms-api jar diff --git a/cms-auth/pom.xml b/cms-auth/pom.xml index eb4ce8eb5..3b313aebb 100644 --- a/cms-auth/pom.xml +++ b/cms-auth/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 cms-auth jar diff --git a/cms-content/pom.xml b/cms-content/pom.xml index 8fb8ef82a..6ab4395dd 100644 --- a/cms-content/pom.xml +++ b/cms-content/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 cms-content jar diff --git a/cms-content/src/main/java/com/condation/cms/content/DefaultContentRenderer.java b/cms-content/src/main/java/com/condation/cms/content/DefaultContentRenderer.java index 32cdc22e7..e40c7a57d 100644 --- a/cms-content/src/main/java/com/condation/cms/content/DefaultContentRenderer.java +++ b/cms-content/src/main/java/com/condation/cms/content/DefaultContentRenderer.java @@ -160,8 +160,13 @@ public String render(final ReadOnlyFile contentFile, final RequestContext contex model.values.put("mediaService", context.get(SiteMediaServiceFeature.class).mediaService()); model.values.put("taxonomies", context.get(InjectorFeature.class).injector().getInstance(TaxonomyFunction.class)); - //model.values.put("messages", context.get(InjectorFeature.class).injector().getInstance(MessageSource.class)); - model.values.put("messages", context.get(RenderContext.class).theme().getMessages()); + + var theme = context.get(RenderContext.class).theme(); + if (theme.empty()) { + model.values.put("messages", context.get(InjectorFeature.class).injector().getInstance(MessageSource.class)); + } else { + model.values.put("messages", theme.getMessages()); + } model.values.put("hooks", context.get(HookSystemFeature.class).hookSystem()); diff --git a/cms-core/pom.xml b/cms-core/pom.xml index 213c3cc74..85464d9b4 100644 --- a/cms-core/pom.xml +++ b/cms-core/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 cms-core jar diff --git a/cms-extensions/pom.xml b/cms-extensions/pom.xml index d16b5cb78..cdd081ae9 100644 --- a/cms-extensions/pom.xml +++ b/cms-extensions/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 cms-extensions jar diff --git a/cms-filesystem/pom.xml b/cms-filesystem/pom.xml index ed8187d38..accafa224 100644 --- a/cms-filesystem/pom.xml +++ b/cms-filesystem/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 cms-filesystem jar diff --git a/cms-git/pom.xml b/cms-git/pom.xml index 62d06700a..12c0b5ef3 100644 --- a/cms-git/pom.xml +++ b/cms-git/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 cms-git jar diff --git a/cms-media/pom.xml b/cms-media/pom.xml index 2cc3c79d2..4dfa94376 100644 --- a/cms-media/pom.xml +++ b/cms-media/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 cms-media jar diff --git a/cms-sandbox/pom.xml b/cms-sandbox/pom.xml index 4576e01bc..5f0bd30e2 100644 --- a/cms-sandbox/pom.xml +++ b/cms-sandbox/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 cms-sandbox pom diff --git a/cms-server/pom.xml b/cms-server/pom.xml index df6ba32ac..577997089 100644 --- a/cms-server/pom.xml +++ b/cms-server/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 cms-server jar diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 1e3635561..fb75fb7e4 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 integration-tests jar diff --git a/modules-framework/api/pom.xml b/modules-framework/api/pom.xml index cc02afa5a..34da0cc36 100644 --- a/modules-framework/api/pom.xml +++ b/modules-framework/api/pom.xml @@ -4,7 +4,7 @@ com.condation.cms.module.framework module-framework - 6.3.0 + 6.3.1 modules-api jar diff --git a/modules-framework/manager/pom.xml b/modules-framework/manager/pom.xml index d9d742cad..19a31ef99 100644 --- a/modules-framework/manager/pom.xml +++ b/modules-framework/manager/pom.xml @@ -4,7 +4,7 @@ com.condation.cms.module.framework module-framework - 6.3.0 + 6.3.1 modules-manager jar diff --git a/modules-framework/pom.xml b/modules-framework/pom.xml index 41a5f369d..7da379aac 100644 --- a/modules-framework/pom.xml +++ b/modules-framework/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 com.condation.cms.module.framework module-framework diff --git a/modules/example-module/pom.xml b/modules/example-module/pom.xml index a3a66be50..fe3d49658 100644 --- a/modules/example-module/pom.xml +++ b/modules/example-module/pom.xml @@ -4,7 +4,7 @@ com.condation.cms.modules cms-modules - 6.3.0 + 6.3.1 example-module jar diff --git a/modules/pom.xml b/modules/pom.xml index b4de6341a..cb7d80f4f 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -4,7 +4,7 @@ com.condation.cms cms-parent - 6.3.0 + 6.3.1 com.condation.cms.modules cms-modules diff --git a/pom.xml b/pom.xml index b8d4c0ae5..1f35fa2c9 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.condation.cms cms-parent - 6.3.0 + 6.3.1 pom UTF-8