Questions tagged [layout-service]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
67 views

How to customize Sitecore's Layout service api url?

The out of the box Sitecore layout service api seems to follow the format /sitecore/api/layout/render/<app>. If I wanted to use a url of the like of /api/layout-service, is it possible to ...
Durga Bose's user avatar
0 votes
1 answer
67 views

Pass own params in Rest Layout Service using Custom Data Fetcher

I was wondering if there's anyway to override the payload in the Rest Layout Service using my own custom params. I'm upgrading the Frontend JSS, so I need to make sure the there's no other API Changes ...
Bryan Ribo's user avatar
0 votes
1 answer
157 views

Sitecore JSS nextjs | The requested document was not found [closed]

Sitecore jss nextjs sample app in connected mode. installation is done as per https://doc.sitecore.com/xp/en/developers/hd/200/sitecore-headless-development/walkthrough--creating-a-jss-next-js-...
Jagmeet Kaur's user avatar
2 votes
1 answer
98 views

Prevent Sitecore from creating the sitename#lang cookie in jss/nextjs app

Is there a way to block Sitecore from creating the {website}#lang cookie? When Sitecore's Layout Service is used with a headless app (a next js app)? Will it be enough to add a processor in ...
Sebastian Tecsi's user avatar
1 vote
1 answer
185 views

How to add a custom header in every JSS layout service request in Node JS reverse proxy solution template

We are using Sitecore 10.2/Headless/JSS React, also we enabled server-side rendering by hosting behind the Headless JSS proxy. We require every layout service to authenticate in the backend(Sitecore), ...
Andi AR's user avatar
  • 723
0 votes
1 answer
104 views

Sitecore Embedded Form - Form Id is not specified in Sitecore JSS

I'm trying to build the Embedded form on the website. So I have created a form on the Sitecore website and Sitecore API Key based on here browse load the HTML website faced the below error My HTML ...
Rameshkumar's user avatar
1 vote
0 answers
51 views

Sitecore DropTree field render in JSS layout service API

I am using DropTree field and I selected the listing page Item. so now I want to see the selected item full path in the layout service API. Actually Layout Data "componentName": "...
Saiprasad's user avatar
3 votes
1 answer
488 views

How to get 404 status code on Rendering host

There is a Sitecore Headless setup with SSG enabled. NextJS allows to show own 404 page but the requirement is to managed the page in CMS. Quick solution was to extend the getStaticProps method in [[.....
Serhii Shushliapin's user avatar
0 votes
2 answers
143 views

Can props.fields ever be null in a Rendering Component?

I'm creating custom types for components in TypeScript (with strict null checks enabled) and I want to confirm if it makes sense to be doing null checks on props.fields, eg.: if (!props.fields) { ...
Marcel Gruber's user avatar
1 vote
2 answers
328 views

How do you render Headless ASP.NET to present a Sitecore page as 404?

As per Sitecore's example code for ASP.NET Headless you can have your default controller method look like this: [UseSitecoreRendering] public IActionResult Index(Route route) { var request = ...
TheHvidsten's user avatar
0 votes
1 answer
278 views

SEO Friendly, Bucket-less Item Path Resolver in Layout Service

TL;DR Has anyone been able to use seo-friendly, bucketless urls with the GraphQL Layout Service? Environment Sitecore 10.2 XM Headless 20 NextJS Rendering Host SXA 10.2 SPE 6.3 Background In ...
Chet Cheeto's user avatar
2 votes
2 answers
563 views

GraphQL Component Query does not effect Layout Service response

Environment: Sitecore 10.2 XM Headless 20 SXA 10.2 SPE 6.3 Problem When I fill in the Component GraphQL Query field for a Json Rendering with something simple like this: query IntegrationQuery($...
Chet Cheeto's user avatar
0 votes
3 answers
471 views

Layout Service performance optimisation

I'm using the JSS Headless Proxy which calls down to the Layout Service for SSR. I'm seeing high TTFB to the Layout Service direct: New session: ~400ms to ~500ms Subsequent requests: ~200ms to ~300ms ...
Mark Gibbons's user avatar
  • 5,432
1 vote
2 answers
734 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>/...
Jonathan Robbins's user avatar
1 vote
1 answer
383 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 ...
Jitendra Ghanekar's user avatar
2 votes
1 answer
415 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 ...
Serhii Shushliapin's user avatar
0 votes
3 answers
381 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. ...
Anvay's user avatar
  • 83
0 votes
1 answer
832 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 ...
Abdul Lathif's user avatar
1 vote
1 answer
470 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 ...
Romeo's user avatar
  • 135
1 vote
1 answer
246 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 ...
Romeo's user avatar
  • 135
2 votes
1 answer
312 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 ...
whuu's user avatar
  • 615
3 votes
1 answer
392 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, ...
int.sli's user avatar
  • 33
0 votes
1 answer
217 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' ...
Fatema elsayed's user avatar
2 votes
1 answer
343 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 ...
whuu's user avatar
  • 615
1 vote
1 answer
79 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 ...
Arvind Gehlot's user avatar
3 votes
1 answer
151 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-...
coolzoa's user avatar
  • 119
3 votes
1 answer
66 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 ...
Arvind Gehlot's user avatar
1 vote
1 answer
419 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 ...
Arvind Gehlot's user avatar
2 votes
0 answers
123 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 ...
Akanksha's user avatar
3 votes
1 answer
280 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 ...
Jeeby's user avatar
  • 251
0 votes
1 answer
641 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 ...
Joost's user avatar
  • 1,897
2 votes
1 answer
347 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: ...
NutsAndBolts's user avatar
  • 1,310
3 votes
1 answer
225 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 ...
DougCouto's user avatar
  • 409
1 vote
0 answers
126 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/...
Anton's user avatar
  • 3,771
0 votes
0 answers
100 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 ...
Arvind Gehlot's user avatar
4 votes
1 answer
2k 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 ...
Arvind Gehlot's user avatar
0 votes
3 answers
371 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 ...
PVM's user avatar
  • 963
4 votes
2 answers
555 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 ...
Sachin Dabas's user avatar
2 votes
1 answer
507 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 ...
Arvind Gehlot's user avatar
1 vote
0 answers
131 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 ...
Arvind Gehlot's user avatar
1 vote
0 answers
59 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 ...
Arvind Gehlot's user avatar
1 vote
0 answers
301 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 ...
Arvind Gehlot's user avatar
0 votes
2 answers
323 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 ...
Jojo's user avatar
  • 463
2 votes
0 answers
401 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 ...
Mark Cassidy's user avatar