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

Error when casting class 'Unable to cast'

Im trying to cast entity class which inherits base class but its returning null. Below is the code snippet class public class CallItem : CallItemBase { [SitecoreField("TitleLink")] public virtual Link TitleLink { get; set; } …
CodeBox
  • 446
  • 4
  • 19
0
votes
1 answer

Glass Mapper Sitecore 8.1 Search content (ContentSearchManager)

I am using Glass Mapper first time into my Sitecore 8.1 project. I am trying to use search functionality using Glass. I have checked the tutorial for Glass (http://glass.lu/Mapper/Sc/Tutorials/Tutorial25) but that throws an error ("var attributes =…
user5113164
0
votes
1 answer

Sitecore Glass Mapper Installation Issue

After installing latest Glass Mapper I am seeing this issue: Could not load type 'Glass.Mapper.IDependencyResolver' from assembly 'Glass.Mapper, Version=4.2.1.188, Culture=neutral, PublicKeyToken=null'. Sitecore Version : Sitecore.NET 8.1 (rev.…
Vamshi
  • 145
  • 5
0
votes
1 answer

Sitecore Query where field is self

In the Query Analyzer I am able to execute the following query which produces my desired result: select * from /sitecore/content/Home//*[@@templatekey='action' and @Department='{38c76731-f18a-4d29-9d52-33fdb3329881}'] When I attempt the following…
kjmagic13
  • 1,298
  • 8
  • 15
0
votes
1 answer

RenderFields Pipeline does not show all Fields in Sitecore

So i was trying to add title tag for all my images in Sitecore. John West had a solution here The issue is, I am not getting all the rendering fields in my pipeline. When i debug the Solution, the breakpoints hits only 4 or 5 times totally and they…
Night Monger
  • 770
  • 1
  • 10
  • 33
0
votes
1 answer

Sitecore Glass Mapper Infer Type Droptree Field with different template items

I have a template BrochuresComponent that has a field named Location which is a droptree. Now using source on the field in sitecore template, a user is only going to be able to add a country item or a continent item to this dropdown option. I want…
0
votes
1 answer

Sitecore 8.0 Rev 3 with WFFM 2.4 and Glass.Mapper 4.0.11.63

Environment: Sitecore 8.0 Rev 3 WFFM 2.4 Glass.Mapper 4.0.11.63 I am having an issue with the above configuration. When I submit a WFFM form the data that is being saved is coming across as "System.String[]" rather than the actual text value. I…
mluker
  • 702
  • 8
  • 26
0
votes
1 answer

GlassMapper - GetItem() method is failing to get item as specific type

I'm trying to get item using GlassMapper as follow: var myCustomObj=SitecoreContext.GetItem(itemId); But myCustomObj is always null. When I try to get the item as IGlass_Base object, it works: var…
Vikram
  • 675
  • 6
  • 25
0
votes
0 answers

GlassMapper Link not rendered when %20 in subject

I have an interesting situation where I am trying to render a link which could be a URL to a site or a mailTo tag. The issue is that when I put any spaces in the subject field these get converted into %20's when I save the link then the link…
Daniel Wood
  • 53
  • 1
  • 4
0
votes
1 answer

Glassmapper: Map target item from Link field

Im using Sitecore with Glassmapper and in my template I have a drop link field that I'm using to link to sitecore items of a specific template (X). In glass mapper's generated .cs this field gets generated as a Link field and that has a targetID…
webber
  • 1,834
  • 5
  • 24
  • 56
0
votes
2 answers

Sitecore, with GlassMapper not returning known item

Problem two of my Sitecore saga: There is a call similar to this: var item = sitecoreService.GetItem(knownId) This code works in production, and in most other cases the code is working correctly, however I navigate to a page and…
James Simpson
  • 1,150
  • 6
  • 11
0
votes
2 answers

How to programmatically create an instance of the Glass.Mapper.Sc.Fields.Image class?

I'm working with a Sitecore MVC website and in a controller, I'm trying to programmatically populate the Src property of the Glass.Mapper.Sc.Fields.Image class. However, it was annoyingly declared with only a public getter and an internal…
Sheridan
  • 68,826
  • 24
  • 143
  • 183
0
votes
1 answer

How to prevent Glass Mapper doing Sitecore fast query?

When I do the ISitecoreContext.Query, if the query contains the [@@templatename='some_name'], for example: "/sitecore/Content/Home/*[@@templatename='some_name']" the query result follows the order in content tree. Otherwise, like the…
jackielpy
  • 72
  • 1
  • 11
0
votes
1 answer

Unable to Auto mapping in sitecore MVC(Razoe VIew) help of glass mapper

Am using controller rendering, I created one model called Footer.cs and it has below properties. [SitecoreType(TemplateId = "{1044CFB5-2B85-4A8D-9DCC-34764D2AF5B3}", AutoMap = true)] public class Footer { public virtual Item Item { get; set; } …
Suresh R
  • 229
  • 2
  • 11
0
votes
1 answer

sitecore glass mapper link rendering pipeline

We have some variable replace code that runs through the sitecore rendering pipeline. Now that we are using glass mapper, the links (Glass.Mapper.Sc.Fields.Link) are no longer going through the Sitecore.Pipelines.RenderField.AddBeforeAndAfterValues…
Donuts
  • 11
  • 1