Questions tagged [glass-mapper]

Questions relating to the Glass.Mapper.Sc ORM framework. More information about the framework is available here: http://www.glass.lu/

36 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
150 views

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 ...
3
votes
0answers
128 views

Glass Mapper Save for a specific language Modifies English language

When I am saving the Sitecore item using the below code. app.Language = itemLanguage; service.Save<Application>(app); It is saving in the respective language but modifying the values in the ...
3
votes
0answers
563 views

Glassmapper causing high CPU usage on Sitecore publishing in two CD servers

Sitecore support has suggested that following code has an issue after analyzing the w3wp process dumps. The Glass.Mapper.IoC.AbstractConfigFactory class has many lock syntax. This locked variable may ...
3
votes
0answers
342 views

Ants Profiler shows slow performance on Glass Mapper calls

Sitecore 8.2 Update 1, hosted in Azure web apps. Noticed that, every first request is very slow to load. After 2nd request, the site loads pretty quick. We use Glass Mapper map Sitecore templates on ...
3
votes
0answers
219 views

Glass error in SPEAK 2.0 on specific environment

First some background information: We're running Sitecore 8.1 rev 160302 We have multiple Sitecore environments (DTAP setup) We have no access to the configs, nor the actual environment (only the ...
3
votes
1answer
773 views

Language Fallback with Glass Mapper

I have two templates that look like the following: Article Title : Single Line Categories : Multilist Pulls in Another Item that provides a level of taxonomy to these articles. Category Title : ...
2
votes
1answer
1k views

Experience Editor issue after upgrading to Sitecore 9.3

After upgrading to Sitecore 9.3 getting below error in Experience Editor:- sitecore Method not found: 'Void Sitecore.Pipelines.GetChromeData.GetChromeDataProcessor We are using Glass Mapper
2
votes
0answers
684 views

Glass Mapper v5 Item creation issue

I'm using Sitecore 9.0 Update 2 with Glass Mapper.Sc version 5.2.13 I'm trying to create items in Sitecore using GlassMapper and the following code repository.RequestContext.SitecoreService....
2
votes
0answers
43 views

Adding extra empty lines in GlassData.cs through TDS

For some reason a lots of empty lines are added when TDS regenerate GlassData.cs. This makes bitbucket diff hard and a lot longer to read, because the previous version didn't have all these blank ...
2
votes
0answers
501 views

Link 'title' attribute not mapping correctly in Glass Mapper

I am using Glass.Mapper.Sc 4.3.4.197 and for some reason the "title" attribute ("Alternative Text" property of the link field in Sitecore; Link.Title property in Glass.Mapper) appears to not be ...
2
votes
0answers
2k views

Get all languages that an item has a version in using Glass Mapper

Using the Sitecore API, I can use the following to get all of the languages that an item has a version in: var itemLanguages = ItemManager.GetContentLanguages(Sitecore.Context.Item) ....
2
votes
0answers
398 views

Sitecore Children & HasChildren throws Stackoverflow exception

I am trying to access children property in my Glass Model type. public partial class Section : GlassBase { [SitecoreChildren] public virtual IEnumerable<Section_Link> Children { get; ...
1
vote
0answers
22 views

Rendering SVG as XML using Glass Mapper

I was curious if anyone has a good solution for rendering SVGs using Glass mapper so that the result is XML embedded into the HTML instead of an tag. I know that I can use Editable() with a ...
1
vote
1answer
36 views

Glass mapper A/B testing error - Model item passed as rendering instead of model

I am using Sitecore 9.3 with Glass.Mapper 5.6.163. When I setup simple A/B testing with different content datasource. I get the below error. Inner Exception: The model item passed into the dictionary ...
1
vote
1answer
47 views

GlassMapper 5.6.160: Component addedon SharedLayout without a version is displayed

Following the below steps, we see an issue in Sitecore v9.3.0 + Glass V5.6.160, compared to Sitecore v9.0.1 + Glass v4.5.0.4: Create a datasource item, version ONLY in EN culture. the fields has ...
1
vote
0answers
25 views

Replacement for GetItemWithInterfaces in GlassMapper latest

We are currently on GlassMapper 4.5 and looking to upgrade to the latest version of GlassMapper. We have a couple of spots where we are using GetItemWithInterfaces. This method no longer exists and I ...
1
vote
1answer
66 views

Sitecore Glass Mapper 5.5.28.0 BaseChildren.OfType not working

We have upgraded our sitecore website to Sitecore 9.2 and also updated our Glass Mapper to version 5.5.28. Currently, we noticed that we can't get the children on our iteration when we specify the ...
1
vote
2answers
109 views

How to pass language to Glass BeginRenderLink

I have a Link field in Sitecore where user could choose any link, site has multiple languages and cultures. In case if user sets a page in the link field that does not have language in current context,...
1
vote
0answers
249 views

MVC Layout model is empty after Glass Mapper Upgrade

We recently upgraded from Sitecore 8.2.0 to Sitecore 9.2.0. Along with other packages, we also upgraded to the latest compatible version of Glass Mapper 5 for Sitecore 9.2.0. We use Simple Injector ...
1
vote
0answers
133 views

Glass GetRenderingParameters SQL query

We are using the method GetRenderingParameters<T>() from Glass in many different places in our code. This method works correctly, it returns the rendering parameters as a strongly typed object. ...
1
vote
0answers
248 views

Using Glass Mapper Interface mapping is there a way to create a concrete object without adding the item to the database?

I'm working on creating an item in the sitecore database, I want to add the entire completed object to the database and not element by element. Is there a way to get interface mapping to create a ...
1
vote
0answers
318 views

Is there any chance to build SXA custom component using Glass mapper?

It may be a very basic question as I'm beginner in sitecore SXA. Is there any possible way to build the SXA custom component using Glass Mapper? Thanks
1
vote
0answers
204 views

Using TDS and Glass Mapper classes as Search Models in Lucene

So currently when we use TDS we use Glass and have TDS automatically generate glass models that represent our data templates in Sitecore. That works well, but when we do search with Lucene using ...
0
votes
0answers
26 views

Is there a way to map Sitecore/System/Languages in Sitecore to Sitecore.Globalization.Languages using Glass mapper

I am using TDS and was trying to map the Glass mapper to Sitecore.Globalization.Languages. This requirement is for a Language dropdown with custom names for different regions.
0
votes
0answers
36 views

Rendering Parameters values being null after sitecore upgrade

We have upgrade Sitecore solution from 9.1 to 10.11, as part of upgradation we had upgraded Sitecore databases and solution. We have around 80 plus sites and we are using sxa. Let me describe about my ...
0
votes
0answers
42 views

Glass Mapper: Cast<MyClass>(myItem) returning null, while previously was correctly returning an instance of MyClass

I have the following legacy code wrote by my predecessors: var formSection = SitecoreContextFactory.Default.GetSitecoreContext().Cast<FormSection>(section); FormSection is a simple class with ...
0
votes
0answers
79 views

SitecoreQuery issue in glass mapper

I use glass mapper 5.3 and I use SitecoreQuery in this field: [SitecoreQuery("/sitecore/content/Newsroom/Data/Enumerations/Companies/*")] public virtual IEnumerable<EnumerationValueItem> ...
0
votes
0answers
137 views

How to upgrade Glass Mapper code that uses AbstractGlassUserControl?

I am upgrading some Glass Mapper code that I inherited. The previous version of Glass Mapper was v3 and I am upgrading to v5.3.17. I have a class that looks like this: public class MyRepository : ...
0
votes
0answers
147 views

Some fields are not being saved in experience editor

I have a component that has following fields: Title Image Link Title Link Among these fields, Title and Link Title are not being saved while editing in the Experience Editor, upon ...
0
votes
0answers
273 views

Implementing a Carousel with Glass Mapper for Sitecore

I am new to Sitecore hence, looking for help from Sitecore enthusiasts. I am implementing a carousel using Glass Mapper (V8.2) I have a data source (a simple folder) which has three carousels as ...
0
votes
0answers
91 views

Is there a way to use complex types as SitecoreFields?

Is there a way to use complex types to duplicate property declarations in a Glass model? For example, imagine a page with 5 images on it and each image needs a URL and alt text: [SitecoreType(...
0
votes
1answer
296 views

Mapping JSON object to Glass object not working - Ajax POST

I have a custom form and wanted to create complex Sitecore items. I am using TDS auto-generated class with GlassMapper. I am passing Glass object from controller to view, which then serialized to ...
0
votes
0answers
527 views

Generating same GlassMapper model classes without using TDS

In our project, we are using TDS to sync and serialize Sitecore items. We are also using TDS to generate GlassMapper model classes for all Sitecore Templates. But now, we are planning to use Unicorn ...
0
votes
0answers
1k views

Single-Line Text <br> Tag Bug

I'm encountering a bug that injects break tags into my single-line text fields after saving. We are working in Sitecore 8.1 Update 1 and using GlassMapper to render fields. When I enter text into the ...
-1
votes
2answers
456 views

Space with 'Name Value List' in Sitecore

We are using Glass Mapper to map the values from Sitecore. System.Collection.Specialized.NameValueCollection is used in Glass Mapper class to map Name Value List from Sitecore. This example data is ...
-1
votes
1answer
424 views

Glass Mapper is not returning an Image Field

I have a model that looks like this: [Serializable] [SitecoreType(TemplateId = "{guid}", AutoMap =true)] public class EventInfo : GlassBase { public virtual string PageTitle { get; set; } ...