From 6b48c5deecddac1b14a6995e2ecefbf70c4d4b55 Mon Sep 17 00:00:00 2001 From: Jens Pelzetter Date: Wed, 22 Dec 2021 20:02:10 +0100 Subject: [PATCH] Some Bugfixes --- .../MultiPartArticleSectionManager.java | 2 +- .../contenttypes/mpa/MvcMpaSectionsStep.java | 4 +-- .../ui/contenttypes/mpa/mpa-sections.xhtml | 33 ++++++++++++++----- .../ui/contenttypes/MpaStepsBundle.properties | 2 ++ .../contenttypes/MpaStepsBundle_de.properties | 2 ++ 5 files changed, 32 insertions(+), 11 deletions(-) diff --git a/ccm-cms/src/main/java/org/librecms/contenttypes/MultiPartArticleSectionManager.java b/ccm-cms/src/main/java/org/librecms/contenttypes/MultiPartArticleSectionManager.java index af9269f07..4a5c94a08 100644 --- a/ccm-cms/src/main/java/org/librecms/contenttypes/MultiPartArticleSectionManager.java +++ b/ccm-cms/src/main/java/org/librecms/contenttypes/MultiPartArticleSectionManager.java @@ -48,8 +48,8 @@ public class MultiPartArticleSectionManager { article.addSection(section); section.setRank(article.getSections().size() - 1); - itemRepo.save(article); sectionRepo.save(section); + itemRepo.save(article); } @Transactional(Transactional.TxType.REQUIRED) diff --git a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/mpa/MvcMpaSectionsStep.java b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/mpa/MvcMpaSectionsStep.java index 458c9f7d6..69487ecb9 100644 --- a/ccm-cms/src/main/java/org/librecms/ui/contenttypes/mpa/MvcMpaSectionsStep.java +++ b/ccm-cms/src/main/java/org/librecms/ui/contenttypes/mpa/MvcMpaSectionsStep.java @@ -151,7 +151,7 @@ public class MvcMpaSectionsStep extends AbstractMvcAuthoringStep { final String sectionIdentifier, @PathParam(MvcAuthoringSteps.DOCUMENT_PATH_PATH_PARAM_NAME) final String documentPath, - @FormParam("initialLocal") @DefaultValue("") + @FormParam("initialLocale") @DefaultValue("") final String initialLocaleParam, @FormParam("title") @DefaultValue("") final String title, @@ -662,7 +662,7 @@ public class MvcMpaSectionsStep extends AbstractMvcAuthoringStep { } row.setTitle( globalizationHelper.getValueFromLocalizedString( - section.getText() + section.getTitle() ) ); diff --git a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contenttypes/mpa/mpa-sections.xhtml b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contenttypes/mpa/mpa-sections.xhtml index 46645c238..17ec47324 100644 --- a/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contenttypes/mpa/mpa-sections.xhtml +++ b/ccm-cms/src/main/resources/WEB-INF/views/org/librecms/ui/contenttypes/mpa/mpa-sections.xhtml @@ -13,11 +13,24 @@

#{CmsMpaMessageBundle.getMessage('sectionsstep.header', [CmsMpaSectionsStep.articleTitle])}

+ + +
+ #{CmsMpaMessageBundle['sectionsstep.error.initial_locale_missing']} +
+
+ +
+ #{CmsMpaMessageBundle['sectionsstep.error.title_missing']} +
+
+
+
-