Several GroupSettings attributes?

Torjus Eidet
Member since: 2010

I get the following error, but I can't find any duplicate attributes in my classes (or base classes). Any idea?

ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
System.InvalidOperationException: It's not allowed to add several GroupSettings attributes for properties within the same class with the same name.
at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.GenerateInvalidOperationException(String baseMessage, ExtendedMetadata propertyMetadata)
at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.ExtractMetadataFromProperties(ExtendedMetadata metadata, MetadataStoreModel MetadataStoreModel, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories)
at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.CreateFromModelMetadata(ExtendedMetadata metadata, LocalizationService localizationService, UIDescriptorRegistry uiDescriptorRegistry, ISelectionFactory[] selectionFactories, Boolean alwaysCreateChildProperties)
at EPiServer.Shell.UI.Rest.DefaultMetadataStoreModelCreator.Create(ModelMetadata metadata)
at EPiServer.Shell.UI.Rest.MetadataStore.Get(String id, String modelAccessor)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.b__41()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.b__20()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at EPiServer.Shell.Services.Rest.RestControllerBase.EndExecute(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

#147690 Apr 21, 2016 13:48
  • Torjus Eidet
    Member since: 2010

    Also, no mentions of "GroupSettings" in my code:

    Find all "GroupSettings", Subfolders, Find Results 1, Entire Solution, ""
    Matching lines: 0 Matching files: 0 Total files searched: 1258

    #147693 Apr 21, 2016 13:52
  • Torjus Eidet
    Member since: 2010

    I've duplicated the affected page type, and no error is thrown for the duplicate. This leads me to believe that there are some corrupt values in the database. But where to look?

    #147725 Apr 22, 2016 10:40
  • Per Magne Skuseth
    Member since: 2009

    Have you tried reverting the content type to default in admin mode?

    #147727 Apr 22, 2016 10:51
  • Daniel Ovaska
    Member since: 2005

    Using guids on all pagetypes?

    Check tblContentType and see if you can find any duplicates there. Also check admin if you can see anything strange there with some pagetypes that lack code

    #147728 Apr 22, 2016 10:54
  • Torjus Eidet
    Member since: 2010

    Yes, I've tried to revert to default. All page types have a GUID, and there isn't any pagetypes lacking code. I didn't find any duplicates in tblContentType. Any other tables I should take a look at?

    Do you know when an IMetadataExtender is executed? One idea I have is to create an empty IMetadataExtender just to look at what's in the ExtendedMetadata object.

    #147731 Apr 22, 2016 11:34
  • Daniel Ovaska
    Member since: 2005

    What version of CMS are you using?

    #147732 Apr 22, 2016 11:59
  • Torjus Eidet
    Member since: 2010

    CORE: 9.7.3

    UI: 9.4.4

    #147733 Apr 22, 2016 12:17
  • Torjus Eidet
    Member since: 2010

    As allways, the most obvious solution is usually correct. Some EditorDescriptor messed with the metadata. Worked in 8x, not in 9x.

    #147739 Apr 22, 2016 13:28
  • Daniel Ovaska
    Member since: 2005

    Ok, problem solved then?

    #147743 Apr 22, 2016 14:22
  • Kristian Elmholt Kjær
    Member since: 2015

    Hi Torjus,

    I'm encountering the same error, and I'm curious to know more details as to what you did to resolve the issue. My solution has several EditorDescriptors...


    #158301 Sep 27, 2016 9:00
  • Andreas Nicolaisen
    Member since: 2006

    I'm getting the same error and would really appreciate some more details

    #160640 Sep 30, 2016 16:21
  • Daniel Ovaska
    Member since: 2005

    Start removing editor descriptors until it works to find the culprit?

    #160641 Sep 30, 2016 16:29
  • Andreas Nicolaisen
    Member since: 2006

    After some help from support, I managed to drill the problem down to this beeing used on the PageType with the problems:

    [Display(GroupName = "EPiServerCMS_SettingsPanel")]

    Once the GroupName was changed, the problem went away

    #160684 Oct 03, 2016 15:03
  • Daniel Ovaska
    Member since: 2005

    Ok, probably wise to use the static I guess

    GroupName = EPiServer.DataAbstraction.SystemTabNames.Settings

    instead to avoid magic strings

    #160685 Oct 03, 2016 15:24
  • Ted
    Member since: 2006

    On some versions this has also been known to happen when using the constant SystemTabNames.PageHeader, which essentially is "EPiServerCMS_SettingsPanel".

    #197530 Oct 05, 2018 13:38
  • valdis iljuconoks
    Member since: 2011

    I wonder what made you answer 2 years old thread? :)

    #197555 Oct 07, 2018 4:38
  • Henrik Fransas
    Member since: 2007

    Maybe Ted wants to get some more points.... ;-)

    #197559 Oct 07, 2018 20:56
  • Ted
    Member since: 2006

    I enjoy returning to the vintage classics from time to time, and I happened to stumble across this problem while doing some work on an old CMS 9 site. :)

    #197659 Oct 09, 2018 16:34