Questions tagged [layout-service]

Any question related to Sitecore LayoutServices can make use of this tag

Filter by
Sorted by
Tagged with
0 votes
0 answers
35 views

Add rendering to a placeholder by default for layout service

Aside from adding the rendering into the standard values of a template. What are other ways of adding a rendering into a layout service placeholder result?
user avatar
  • 135
0 votes
0 answers
19 views

Disable root item search in Layout Service

Can I disable item=/ request on my layout service? I notice that this request is kept alive when the request to layout service does not include the sc_site parameter (site context). It continuously ...
user avatar
  • 135
0 votes
1 answer
84 views

Layout Service returns 404 on CD Servers for Sitecore 10.2 XM

For my new Sitecore 10.2 XM instance I have set up Headless Services 19.0 on the CM and CD instances as described on the docs site. When I test the endpoint on the CM server https://<CM Url>/...
user avatar
0 votes
1 answer
63 views

How to add additional input parameter in Layout Service?

We are trying to use Sitecore Layout service to get Sitecore content in JSON format. Is it possible to add additional parameter which we can read and use to customize the Layout service output? Thanks ...
user avatar
0 votes
0 answers
25 views

Sitecore ASP.Net Rendering SDK - Update Sitename on each request

Refering the OOTB sample code for Sitecore ASP.Net Rendering SDK, we provide the sitename at the application level and it execute at the very first time only, not with every request. services....
user avatar
  • 812
2 votes
1 answer
141 views

Sitecore.LayoutService.dll version mismatch between NuGet and Headless Services package

On Sitecore 10.1.1, I've got Sitecore Headless Services Server XP 18.0.0 rev. 00473 installed. According to documentation, that's the correct version. The package brings Sitecore.LayoutService.dll ...
user avatar
0 votes
3 answers
95 views

Extending LayoutService RenderingContentsResolver class to configure default LayoutService response

I want to have TemplateName & TemplateID of the datasource item for a JSON rendering in the response of the LayoutService which doesn't comes by default. So I have created a custom patch. ...
user avatar
  • 53
0 votes
1 answer
258 views

How to customize sitecore layout service json response

How to customize Sitecore layout service json response completely by removing even Sitecore, context and route level and only return the custom data in the response? For one of my POCs, I have the ...
user avatar
1 vote
1 answer
192 views

How to add a new property in the route object of the JSS Layout Service?

By default, the Layout Service provides the layout information as layoutId in the route object. Although it is difficult to make a connection with this information in other applications since the id ...
user avatar
  • 135
1 vote
1 answer
113 views

ProcessItem when extending JssGetLayoutServiceContextProcessor

When extending JssGetLayoutServiceContextProcessor, is there a way to call ProcessItem just like in Sitecore.LayoutService.ItemRendering.ContentsResolvers.RenderingContentsResolver? public class ...
user avatar
  • 135
2 votes
1 answer
125 views

When JSS component is hidden via personalization Experience Editor show warning about missing "Hidden Rendering" implementation

After applying personalization rule to JSS component and using option to hide, Experience Editor shows warning that "Hidden Rendering" is not implemented in React, which is not too friendly ...
user avatar
  • 596
2 votes
1 answer
155 views

Why JSS Layout Service default resolver differently resolves reference fields of the same item, leaving some with the reference item context or ID?

JSS Layout Service default resolver resolves reference fields with full referenced item context, but other reference fields leaves with the ID of the referenced item. For example there is an item, ...
user avatar
  • 23
0 votes
1 answer
119 views

How To Get Template Id In JSONResult

I'm using Sitecore 10 and SXA. And I'm trying to add template-id to be returned in JSON Result Layout. I tried creating a new JSON Field under the rendering variant with field name value ('template' ...
user avatar
2 votes
1 answer
144 views

Skip standard fields in GraphQL query results without strongly-typed items

Is there an easy way to return all fields, while skipping standard Sitecore fields in GraphQL query results without strongly-typed items? I know that I can use fields(ownFields:true), but it will ...
user avatar
  • 596
1 vote
1 answer
32 views

Asp.Net Model binding is not working for any node that is under "placeholders" using Sitecore ASP.NET Rendering SDK

I am following this https://doc.sitecore.com/developers/100/developer-tools/en/model-binding.html to bind my custom model for complex json response from my LayoutService API. The properties and fields ...
user avatar
3 votes
1 answer
55 views

Adding a list of objects to Context Data returned by Layout Service

I was working on a project that needed some data passed on through the context. Logic was implemented based on https://jss.sitecore.com/docs/techniques/extending-layout-service/layoutservice-extending-...
user avatar
  • 43
3 votes
1 answer
57 views

How to get ContentBlockModel/Component Model from PageModel directly using asp.net core rendering sdk

I am following the document https://doc.sitecore.com/developers/100/developer-tools/en/walkthrough--using-the-getting-started-template.html to create a test sample project for Sitecore Headless ...
user avatar
1 vote
1 answer
119 views

Relative item path in layout service call is not working

I am trying to access Sitecore 10.1 item via layout services and it is working fine with GUID and full path. But when I am trying to access it via a relative path from the current app, it is not ...
user avatar
1 vote
0 answers
46 views

Sitecore Virtual login and accessing userProfile.context during layout service execution

we are working on custom personlization rules with user data available outside sitecore. App is developed in jss in ssr mode. With sitecore login setting up virtual user context when user logged in to ...
user avatar
3 votes
1 answer
130 views

Layout Service Sending Sitecore Item Name instead of Component Name

I have a brand new Sitecore 10 site, with SXA and JSS installed. I have migrated an accelerator site we built for Sitecore 9.3, so it is possible that this behaviour was introduced, however it does ...
user avatar
  • 251
0 votes
1 answer
334 views

JSS Layout Service fails an item resolving by path with virtual directory

I am using Sitecore 9.3 JSS with a Create React App front-end with a virtual folder setup. When I create a link pointing to the site root item, it works fine when directly browsing to it e.g. opening ...
user avatar
  • 1,847
1 vote
1 answer
194 views

Null refrence exception for RenderingExtensions.IsSerializable

Sitecore 9.3 JSS What is happening: Many a time, we are getting 500 from the layout service. In the log we have the following entry: ERROR Exception during Layout Service RenderItem (configuration: ...
user avatar
  • 1,086
3 votes
1 answer
131 views

Why is JSS rendering items of template Sample Item but not of any other template?

I installed Sitecore JavaScript Services Server for Sitecore 9.3 XP 13.0.0 rev. 190924 in a 9.3 instance. I then created an item under the Home item using the /sitecore/templates/Sample/Sample Item ...
user avatar
  • 409
1 vote
0 answers
76 views

Sitecore SXA JSON Layout. Why some datasources are not serialized?

I have Sitecore SXA website 9.2 + 1.9. I have a page that is built from partial designs. Partial designs contain many components. I want to get JSON layout. I open some page http://somewebsite/...
user avatar
  • 3,386
0 votes
0 answers
61 views

Visitor identification for native mobile apps and Sitecore LayoutServices?

Currently, I am using Sitecore Layout Services to expose Sitecore content to Mobile Native applications. Whenever I am making a request to the Layout Service using Postman, My analytics cookie is ...
user avatar
4 votes
1 answer
870 views

Cannot query field \"search\" on type \"Query\"

My question is based on already asked question and can be found here Sitecore Filtering by Field Value on Query of GraphQL This question is marked as answered by @jan-bluemink but I am facing the ...
user avatar
0 votes
3 answers
209 views

Using Layout Service with master db

We have a requirement to fetch the item fro the master db. JSS is always pointing to the web db. We tried to add the query parameter as sc_content=master in the Layout Service, but still the Layout ...
user avatar
  • 953
4 votes
2 answers
368 views

JSS layout service, how to restrict public access

I want to secure my Sitecore JSS LayoutService in such a way that only the client application (i.e. react app) can access my LayoutService API. Please note, I am not taking about the login/logout ...
user avatar
2 votes
1 answer
248 views

Method not found: 'Sitecore.JavaScriptServices.ViewEngine.Pipelines.GetRenderEngineFactory.GetRenderEngineFactoryArgs.get_RenderEngineType()

I am working on Sitecore JSS and created a sample application. When I am trying access with the new hostname, configured in the app patch file, I got below error. 35472 12:00:27 ERROR Failed to ...
user avatar
1 vote
0 answers
114 views

Analytics ID has been flagged as robot traffic even when AutoDetectBots is set to false for Layout Service call?

I am using Layout Services API call to get data from Sitecore. Layout Service API is working fine and I am getting a response back in json format. My xDB is enabled and working fine for other ...
user avatar
1 vote
0 answers
40 views

Getting 404 not found error with Sitecore.HabitatHome.Omni on http://habitatfitness.dev.local/sitecore/api/habitatfitness/sports/facet?sc_apikey={key}

I was doing some research on Sitecore.HabitatHome.Omni. It is working fine at my local instance but getting an error while setting up personalization. I got a 404 status code while submitting the form ...
user avatar
1 vote
0 answers
222 views

Personalization is not working in Layout Service call?

I only installed Sitecore JavaScript Services Server for Sitecore 9.1.1 XP 11.1.0 rev. 190508.zip to check Layout Services and nothing else. My jss layout service is absolutely working fine with url ...
user avatar
0 votes
2 answers
263 views

How tracking works for Layout service used for Mobile apps (API-Only Mode)?

I'm new to JSS, I need to use JSS Layout service to send personalized content to a Mobile App(API-Only Mode). From Jss Documentation Via Layout Service Layout Service requests are tracked on ...
user avatar
  • 443
2 votes
0 answers
189 views

How do I get my SSR proxy to site resolve the LayoutService for my JSS/SXA Site?

We're on Sitecore 9.2, SXA 1.9, JSS 12. previously On 9.1, we had the following setup: JSS App sitting in /sitecore/content/myapp A site definition that mapped a hostName to our /myapp A JSS ...
user avatar
  • 24.3k