Questions tagged [glass-mapper]

Questions relating to the Glass.Mapper.Sc ORM framework. More information about the framework is available here:

Filter by
Sorted by
Tagged with
11 votes
3 answers

Attempt by method 'Glass.Mapper.Sc.Utilities.get_IsPageEditor()' to access method 'Sitecore.Context+PageMode.get_IsPageEditor()' failed

Just updated a simple instance of Sitecore 8.1 to 8.2, the actual solution contains a simple demo, some templates, items, nothing too complex. All went fine as I followed all the steps from the ...
Adrian C.'s user avatar
  • 534
14 votes
1 answer

What are the options for Glass Mapper model attributes?

I have looked through the documentation and tutorials on the Glass Mapper site, but I can't find a list of the different attributes that are available and what they do.
Ben Golden's user avatar
  • 3,303
3 votes
1 answer

Glassmapper | Cannot save a class that does not contain a property that represents the item ID

Environment: Sitecore 9.0.2 + Glass Mapper I have a class like this: public class Sample { public Glass.Mapper.Sc.Fields.Image Logo { get; set; } public string Destination_Name { get; set; }...
NutsAndBolts's user avatar
  • 1,310
0 votes
1 answer

Glass Mapper 5 lazy loading

We migrated to Sitecore 10.1 and Glass Mapper is upgraded to from I noticed the mapping was not working. I changed the code from var centreHours = glassContext.GetItem<...
Owais Ahmed's user avatar
15 votes
1 answer

Editable Sitecore fields with Glass

Folks I'm trying to do something basic here which is have a general link and an image field as editable in experience editor on my view using Glass. my end goal is to have two editable fields which ...
Diego's user avatar
  • 5,678
7 votes
1 answer

Item not found when saving page in Experience Editor

I have a strange situation where I get a 'Item not found' on postback in Experience Editor when I edit an page. The culprit is a controller rendering which has a line of code in to get the current ...
Adam Seabridge's user avatar
7 votes
2 answers

Using Unicorn to Generate Glass Mapper Models

How can I use Unicorn to generate Glass Mapper models for my Sitecore items?
ADH's user avatar
  • 1,765
6 votes
1 answer

After upgrading to Glass Mapper 5, unable to globally enable lazy loading

In the implementation using Glass Mapper 4.3.x, I was enabling Lazy Loading in GlassMapperScCustom: public static IDependencyResolver CreateResolver(){ var config = new Glass.Mapper.Sc....
Tom Paterno's user avatar
6 votes
2 answers

Glass Cast issues after upgrading from Sitecore 7.2 to 8.2

So, I upgraded a Sitecore solution from 7.2 to 8.2. All works well, except for the site. I keep on getting the error in my views like the one below: The model item passed into the dictionary is of ...
Hetal Dave's user avatar
4 votes
1 answer

Disabling the Glass lambda cache

I believe an issue we're running into might be related to the lambda cache in Glass - I'm also concerned about the performance ramifications if we were to disable it. Has anyone done this and ...
George Chang's user avatar
  • 1,215
4 votes
2 answers

How to use Glass Mapper's BeginEditFrame(string buttons, string dataSource, string title)

I've created my own custom experience button to edit some responsive images for a logo in my header and I added the button to the rendering. It works as expected and I am not having any problems with ...
Iceape's user avatar
  • 617
4 votes
0 answers

SitecoreRequestScopeModule holding many objects leading to memory leak

We are seeing a steady memory growth on our Sitecore 8.2 update 1 application. We had AUTOFAC DI previously and have been completely replaced with Sitecore OOB MS DI. We followed some guidance from ...
Nil Pun's user avatar
  • 2,283
2 votes
1 answer

Sitecore 8.1 to 8.2 Glass Mapper Related Error?

I am attempting an update from Sitecore 8.1 Update 1 to 8.2 Update 2 and after running the update package and and showing now errors on the update, I am getting the below error after logging in. I ...
Chris's user avatar
  • 145
2 votes
2 answers

Trouble creating content item using Glass Mapper on a CD server

I have a Sitecore 8.1 CD server. I have a page where a user can create a new shipping address and save it back to the Master database. I am using Glass Mapper for this. Here is my code: Models....
Corey Burnett's user avatar
2 votes
1 answer

How to get children of an item via glass mapper?

I am building a navigation component using glass mapper. The problem I am facing is not being able to get children items of a navigation item. Right now I am only getting Parent navigation items. ...
robocup's user avatar
  • 23
2 votes
1 answer

Glass Mapper - Item not null when language version not present

I'm using Glass 5.4.18 with Sitecore 9.0.2. I have a base template for my site that has language fallback turned on by default, but for a few items the client wants to disable language fallback so the ...
Ken McAndrew's user avatar
  • 5,092
2 votes
1 answer

Too much item reads in Debug Mode

I am facing the following issue that I have a simple Controller Rendering with which is using the Demo template with 1 field (Label) and if I switch to Debug Mode in Experience Editor then I can see ...
Tamás Tárnok's user avatar
1 vote
1 answer

Glassmapper 5 SitecoreChildren listing items even if the version count is 0

We upgraded Glass Mapper version from to In our model, we are using [SitecoreChildren(InferType = true)] to get the child items. For few of the child items, language fallback is ...
Shiva's user avatar
  • 379
1 vote
1 answer

Glass Error opening Experience Editor (ObjectToSwitchTo)

I'm using @Html.Glass().Editable(Model, x => x.MyProperty) for some of our single-text / rich text fields. When I load the site with this code in the view everything looks fine. However, when I ...
Paul's user avatar
  • 535
0 votes
1 answer

Glass mapper BeginRenderLink stripping query string parameter that is a Url with ga parameters

I'm using glass mapper BeginRenderLink to output some links: @using (BeginRenderLink(link, n => n.Destination, isEditable: true)) { @RenderImage(link, lnk => lnk.LinkIcon, isEditable: true, ...
Ethan Schofer's user avatar
0 votes
1 answer

Glass Mapper Upgrade to GetDatasource is no longer working after GlassController Obsolete

The following code was working before the upgrade to the latest glass mapper. Since removing the GlassController inheritance the following no longer works. Is there something in the latest version ...
RReilley's user avatar
  • 755