From 1660d25bade5d9fc323da36e2d875bc9cbd674fb Mon Sep 17 00:00:00 2001 From: Shannon Date: Mon, 9 Apr 2018 15:01:55 +1000 Subject: [PATCH] ensures that only the default variant is available when creating content --- src/Umbraco.Web/Editors/ContentController.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Editors/ContentController.cs b/src/Umbraco.Web/Editors/ContentController.cs index 39c73c812e..9edc6e8351 100644 --- a/src/Umbraco.Web/Editors/ContentController.cs +++ b/src/Umbraco.Web/Editors/ContentController.cs @@ -305,7 +305,12 @@ namespace Umbraco.Web.Editors //remove this tab if it exists: umbContainerView var containerTab = mapped.Tabs.FirstOrDefault(x => x.Alias == Constants.Conventions.PropertyGroups.ListViewGroupName); - mapped.Tabs = mapped.Tabs.Except(new[] { containerTab }); + mapped.Tabs = mapped.Tabs.Except(new[] { containerTab }); + + //Remove all variants except for the default since currently the default must be saved before other variants can be edited + //TODO: Allow for editing all variants at once ... this will be a future task + mapped.Variants = new[] {mapped.Variants.First(x => x.IsCurrent)}; + return mapped; }