1

We upgraded from sitecore 7.2 to 8.2 and glass mapper from 4.0.9.60 to 4.4.0.199/4.4.1.331-beta. After upgrade, new SitecoreService("master").Create(folderItem, name, language) is failing with below exception messages. Below is full stack trace.
Resource class : https://www.dropbox.com/s/qu3qgneupw2xdym/Resource.cs?dl=0
GlassBase class: https://www.dropbox.com/s/lk8w4d66v20o32a/EWGlassBase.cs?dl=0

Exception messages: 1.Failed to find configuration for parent item type Sitecore.Data.Items.Item at base.GlassContext.GetTypeConfiguration(parent, false, true)
2.The type Sitecore.Collections.ChildList does not contain any generic arguments
Sitecore Config: https://www.dropbox.com/s/xi8xy587k7krao2/ew%20norm.showconfig.xml?dl=0

15016 19:03:10 ERROR EW Exception on ItemService.Create. Path: /sitecore/content/EmpowerWomen/Home/Resources/Documents/2017/12, Name: testtest, Language: en. Exception: Glass.Mapper.MapperException Message: Failed to find configuration for parent item type Sitecore.Data.Items.Item Source: Glass.Mapper.Sc at Glass.Mapper.Sc.SitecoreService.Create[T,TK](TK parent, String newName, Language language, Boolean updateStatistics, Boolean silent) at UNWomen.SC.EW.Core.Services.ItemService.Create[T](String path, String name, Language language, Boolean useYearMonthFolders, Boolean checkDuplicatedName) in C:\Source\Repos\UNWSitecore\UNWomen.SC.EW.Core\Services\ItemService.cs:line 43

Nested Exception

Exception: Glass.Mapper.MapperException Message: The type Sitecore.Collections.ChildList does not contain any generic arguments Source: Glass.Mapper at Glass.Mapper.Utilities.GetGenericArgument(Type type) at Glass.Mapper.Sc.DataMappers.SitecoreChildrenMapper.Setup(DataMapperResolverArgs args) at Glass.Mapper.Pipelines.DataMapperResolver.Tasks.DataMapperStandardResolverTask.Execute(DataMapperResolverArgs args) at Glass.Mapper.Pipelines.AbstractPipelineRunner2.<>c__DisplayClass8.<.ctor>b__1(T args) at Glass.Mapper.Pipelines.AbstractPipelineTask1.Next(T args) at Glass.Mapper.Pipelines.AbstractPipelineRunner2.Run(T args) at Glass.Mapper.Context.ProcessProperties(IEnumerable1 properties) at Glass.Mapper.Context.Load(IConfigurationLoader[] loaders) at Glass.Mapper.Context.GetTypeConfigurationFromType[T](Type type, Boolean doNotLoad, Boolean checkBase) at Glass.Mapper.Sc.SitecoreService.Create[T,TK](TK parent, String newName, Language language, Boolean updateStatistics, Boolean silent)

4
  • looks like the same problem: sitecore.stackexchange.com/questions/2659/… Commented Dec 13, 2017 at 8:40
  • thanks andrei. but this issue is happening in both CM and CD servers. added a link to the sitecore configuration file above for reference. Commented Dec 13, 2017 at 11:05
  • do you have [SitecoreParent] public virtual BasePage Parent { get; set; } property in your glass base class? Commented Dec 13, 2017 at 13:07
  • Yes, we have that Parent property with [SitecoreParent] attribute in GlassBase Commented Dec 13, 2017 at 14:51

1 Answer 1

0

Your folderItem type should not be inherited from Sitecore.Data.Items.Item(and folderItem should not be type of Sitecore.Data.Items.Item).

It should be any your Glass Mapper model, but not inherited from Sitecore.Data.Items.Item.

This issue was reported to Glass Mapper GitHub and resolution is to use different parameters.

1
  • Thanks Anton. We change it to one of the existing Glass base models and it worked. But if we try and use a different Glass model, it is not working. Let us know if there is any more information. Commented Dec 14, 2017 at 21:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.