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
0 answers

Glass mapper is appending 'h' and 'w' on image tags source URL

We upgraded glass mapper to v.4.0.9.60 from v 3.2.1.42. after upgrading URLs are being appended by h and w as height and width which is resulting into some improper image rendering. In previous version it was working fine. If we remove h and w query…
0
votes
2 answers

How do I add an item to a TreelistEx using C#?

I can't seem to find any documentation on this. I have an item, that has a TreelistEx field: I want to programatically add a new item to this field, preferably using glass mapper but vanilla sitecore will do if needs must. Can anyone help me out…
Liam
  • 27,717
  • 28
  • 128
  • 190
0
votes
0 answers

'Page editing error. Could not find property on type System.Object' after upgrading to Glass mapper v.4.0.9.60

We have recently upgraded our application from Glass mapper v3 to v.4.0.9.60 and facing this error 'Page editing error. Could not find property on type System.Object' on all properties in Edit mode. It works fine in live mode or preview mode. Here…
0
votes
1 answer

Handling CheckboxField in GlassMapper

I am currently using Glass Mapper to map items in the sitecore tree to Model classes in C#, however I am having issues when trying to read the Checked parameter of a checkbox field on the item. How do I read the Checked property? I have tried…
Matthew Pigram
  • 1,400
  • 3
  • 25
  • 65
0
votes
0 answers

Saving an item back to Sitecore using GlassMapper

I have a object that was created using GlassMapper without doing a verbose property-by-property assignment? information.Fields["field1"].Value = obj.Value ... I was using this as a reference and it is helpful, but I want to use GlassMapper to save…
uioporqwerty
  • 317
  • 5
  • 22
0
votes
3 answers

Sitecore Glass Mapper Link Field cannot be edit by Page Editor Mode

Hi I'm currently using Sitecore 8.1 update 1 with MVC5.2.3 and Glass Mapper. I'm having some issues with the Glass Mapper link field. I have created a template which is derived from Standard Rendering Parameters template in which I have used…
0
votes
1 answer

StructureMap and sitecore glassmapper V4

Currently we are using GlassMapper V3 and CastleWindsor in our project. We would like to upgrade it to V4 for performance and use structure map IOC instead of CastleWindsor. Not sure how to make GlassMapper to use structure IOC. Any help on this…
Venkat
  • 853
  • 10
  • 26
0
votes
2 answers

Sitecore Glass Mapper - Using Item Renderings

I'm setting up a carousel in Sitecore using Glass Mapper. In the foreach loop to generate each carousel item, I can get the items out easily enough and make them editable with the @Editable command. What this doesn't give, however, is finer control…
Ken McAndrew
  • 203
  • 2
  • 10
0
votes
0 answers

Sitecore field value being truncated at 255 characters?

I am encountering an issue where the value of string -- stored in a Single-Line Text field -- is returned as being truncated to the first 255 characters. When I look in the Content Editor, I see the excess characters. If I query the database…
eat-sleep-code
  • 4,753
  • 13
  • 52
  • 98
0
votes
1 answer

Sitecore Glass Mapper (v4): Add custom query string parameter via RenderImage

Using Glass Mapper for Sitecore version 4 (MVC), I need the following method call: @Html.Glass().RenderImage(Model, x => x.PhotoField, new {cropregion = xmlValue.GetCropRegion()}, true, true) to result in:
jhansen
  • 3
  • 1
0
votes
1 answer

Glass.Mapper.MapperException: Failed to create type - No parameterless constructor defined for this object

Following an earlier post, I'm implementing this YouTube Video Picker in Sitecore - this has involved creating a custom Field Type (YouTubeVideoField). the control itself works no problem but when trying to get the video on the page…
Daniel
  • 79
  • 11
0
votes
1 answer

Sitecore 8.1: Glass.Mapper & Razor

Running a new site on Sitecore 8.1 - installed and setup Glass.Mapper but I cannot use calls such as @RenderImage - it's complaining that i'm missing the reference to Glass.Mapper.Sc.Mvc, which I have already. The following are the Nuget modules…
0
votes
1 answer

GlassMapper - Boolean method not found HasValue

just installed glass mapper on a new Sitecore 8.1 solution and as soon as I loaded up the site I keep getting the following error - more details in screenshot. Any thoughts? Method not found: 'Boolean…
Daniel
  • 79
  • 11
0
votes
2 answers

Is it safe to use SC 7.2 Glass.Mapper.Sc assembly version for SC 8?

Glass.Mapper.Sc has an assembly for each version of Sitecore.Kernel (located in the lib folder of the nuget package). We are building a library which should be usable for different versions of Sitecore (7.2 and 8.1) and I would like not having to…
Mark Lowe
  • 1,056
  • 8
  • 16
0
votes
1 answer

Error in controller rendering while using glass mapper

I have implemented controller rendering in sitecore 8.1 MVC. I am getting the following error in Index method: ERROR: The given key was not present in the dictionary Code: { var context = new SitecoreContext(); var Model =…
Sukhjeevan
  • 3,074
  • 9
  • 46
  • 89