Questions tagged [glass-mapper]

Glass.Mapper is a Sitecore module that provides an ORM solution for the Sitecore CMS.

Glass.Mapper is an open source object mapping framework for .NET CMS systems

302 questions
0
votes
1 answer

Models not loaded by Glass Mapper

Could anyone tell me why the models that I have in an external library (referenced in my main project) can't be loaded by Glass Mapper? I get something like this: Type Test.Project.Models.Item has not been loaded The version of Glass Mapper is…
Marius Popa
  • 564
  • 1
  • 5
  • 22
0
votes
1 answer

Logging/Debugging Mapping Errors in Glass Mapper SC 4.0.2.10

Does anyone know of a way to force Glass Mapper SC to throw exceptions for mapping errors? It appears to swallow them, and I'm left with null properties and no easy way to diagnose the problem. The tutorials don't really dive deep into attribute…
Ken
  • 311
  • 1
  • 10
0
votes
0 answers

GlassMapper 4.0.1.8 and Sitecore 8 (rev. 150621): View rendering model error

I am trying to render a view rendering without specifying the model in sitecore while trying to use fluent configuration mapping as shown in the link below. http://www.glass.lu/Blog/GlassV4 When I go to the page, I get the below error. The model…
Chitrang
  • 1
  • 4
0
votes
1 answer

How to implement an editable for a TreeListEx field in sitecore/glassmapper?

I have a field in sitecore that is a TreeListEx. I need to support this field in the experience editor. I'm using MVC controller renderings. I'm having difficulty finding anything that gives me any pointers in how to do this. The glass doc's don't…
Liam
  • 27,717
  • 28
  • 128
  • 190
0
votes
2 answers

Sitecore DI with Unity

I'm trying to setup a brand new Sitecore 7.2 website and I'm looking to integrate MVC 5, Glass Mapper and Microsoft Unity as a DI container and Sitecore doesn't want to play very nice. My scenario is this: Got a Web project called PoC.Quotes.Web -…
0
votes
0 answers

Glass Mapper support Experience Editor for child items

I have View rendering control for Sitecore 8 MVC, This view render control render some children items for selected data source. public interface IBase { [SitecoreId] Guid Id { get; set; } } public interface IRootCollection :…
Arbejdsglæde
  • 13,670
  • 26
  • 78
  • 144
0
votes
2 answers

Sitecore Glass.Mapper error when item is not available

We have a Sitecore site that's using Glass.Mapper. We also have a simple two step workflow, "Draft > Ready for publish" on all items. There are global items, which are promos that can be placed on pages. Authors create promos, then create pages and…
Scott
  • 1,011
  • 1
  • 15
  • 30
0
votes
1 answer

Sitecore: Generic GlassMapper GetChildren Method

I'd like to create a generic method to get glass casted items of T. What I have so far is: private static List GetChildren(Item parentItem) where T: class { var lstChildItems = parentItem.Children.Where(child =>…
Jo David
  • 1,696
  • 2
  • 18
  • 20
0
votes
1 answer

Glass Mapper exception : Can not convert value PermanentRedirect to enum type

I am getting glass mapper exception in my project solution as follow stack trace: [MapperException: Can not convert value PermanentRedirect to enum type…
Nikunj
  • 1
  • 1
0
votes
1 answer

Sitecore Glass.Mapper returns null

Suddenly and for no apparent reason a piece of code using Glass.Mapper that always worked fine no longer does so. I am trying to retrieve the Glass wrapper of the root element of my website, which is of template MenuPage: var root =…
Emanuele Ciriachi
  • 2,216
  • 2
  • 26
  • 39
0
votes
3 answers

GlassMapper GetHomeItem always returning null

I have been using GlassMapper for a long time, and this piece of code has always worked flawlessly; today, after playing with the children of the Home item it no longer works - even if I undo my changes. On Internet I found no documentation for this…
Emanuele Ciriachi
  • 2,216
  • 2
  • 26
  • 39
0
votes
3 answers

Glass Mapper RenderLink language embedding

In Sitecore 8, we are currently generating menu items using Glass Mapper's @RenderLink method. We have set the "languageEmbedding" attribute of the LinkManager Provider to "never" but glass seems to ignore this setting. $RenderLink(mi, x =>…
0
votes
1 answer

Sitecore parameters and data handlers

We are currently converting a large application from WebForms to MVC. Our application has an idea of, what we call, dynamic resources in that we have items in Sitecore that specify resources (CSS/JS) and those can be attached to a page so they can…
Matt M
  • 1,093
  • 2
  • 11
  • 26
0
votes
2 answers

GlassMapper does not map and Image property when using SitecoreContext.Map(result);

We are using a repository to get Sitecore items from Solr and then map them to a Sitecore object using SitecoreContext.Map. Everything gets data except the Image property which is null. The model is generate from TDS and the property…
0
votes
1 answer

Use Simple Injector instead of Castle Windsor for Glass Mapper

I am sitting reading about Glass.Mapper. It looks nice, and is what I want to use for a project at work. We actually use Glass.Mapper for some projects, but we are in the loop for streamline our toolset, and have decided to use Simple Injector for…
mslot
  • 4,959
  • 9
  • 44
  • 76