From b9d8fd1b3f142584b1ecacab019edc564d64f432 Mon Sep 17 00:00:00 2001 From: SammyIsConfused Date: Thu, 7 May 2020 16:56:20 +1000 Subject: [PATCH] Merge pull request #1708 from SammyIsConfused/bugfix/fix_lost_metadata_due_to_mandatory_fields Contribution wizard lost metadata fix --- .../src/com/tle/web/wizard/section/RootWizardSection.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Plugins/Core/com.equella.core/src/com/tle/web/wizard/section/RootWizardSection.java b/Source/Plugins/Core/com.equella.core/src/com/tle/web/wizard/section/RootWizardSection.java index 25d950a655..54e291b82f 100644 --- a/Source/Plugins/Core/com.equella.core/src/com/tle/web/wizard/section/RootWizardSection.java +++ b/Source/Plugins/Core/com.equella.core/src/com/tle/web/wizard/section/RootWizardSection.java @@ -54,6 +54,7 @@ import com.tle.web.template.Decorations; import com.tle.web.template.Decorations.MenuMode; import com.tle.web.viewurl.ItemSectionInfo; +import com.tle.web.wizard.WebWizardPage; import com.tle.web.wizard.WizardExceptionHandler; import com.tle.web.wizard.WizardService; import com.tle.web.wizard.WizardState; @@ -303,8 +304,8 @@ protected WizardSectionInfo getWizardInfo(SectionInfo info) { void validateMandatoryFields(SectionInfo info, WizardState state) { PagesSection ps = info.lookupSection(PagesSection.class); - wizardService - .getWizardPages(state) + wizardService.getWizardPages(state).stream() + .filter(WebWizardPage::isViewable) .forEach(p -> wizardService.ensureInitialisedPage(info, p, ps.getReloadFunction(), true)); } }