Questions tagged [layout-service]
Any question related to Sitecore LayoutServices can make use of this tag
42
questions
0
votes
0
answers
25
views
Create Image XML sitemap in Sitecore JSS [duplicate]
I want to create a image xml sitemap, like sitemap.xml where I want to show the URL of all images.
I was able to retrieve the URLs using content resolver in Layout service.
What is the approach we can ...
0
votes
0
answers
60
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 ...
1
vote
0
answers
36
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": "...
3
votes
1
answer
198
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 [[.....
0
votes
2
answers
56
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) {
...
1
vote
2
answers
187
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 = ...
0
votes
1
answer
136
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 ...
1
vote
1
answer
283
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($...
0
votes
0
answers
76
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?
0
votes
0
answers
24
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 ...
0
votes
3
answers
324
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
...
1
vote
2
answers
447
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>/...
1
vote
1
answer
256
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 ...
2
votes
1
answer
289
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 ...
0
votes
3
answers
255
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.
...
0
votes
1
answer
616
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 ...
1
vote
1
answer
350
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 ...
1
vote
1
answer
196
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 ...
2
votes
1
answer
209
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 ...
2
votes
1
answer
303
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, ...
0
votes
1
answer
175
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' ...
2
votes
1
answer
267
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 ...
1
vote
1
answer
66
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 ...
3
votes
1
answer
102
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-...
3
votes
1
answer
65
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 ...
1
vote
1
answer
268
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 ...
2
votes
0
answers
85
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 ...
3
votes
1
answer
188
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 ...
0
votes
1
answer
507
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 ...
2
votes
1
answer
283
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: ...
3
votes
1
answer
182
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 ...
1
vote
0
answers
109
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/...
0
votes
0
answers
91
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 ...
4
votes
1
answer
1k
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 ...
0
votes
3
answers
307
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 ...
4
votes
2
answers
494
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 ...
2
votes
1
answer
399
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 ...
1
vote
0
answers
126
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 ...
1
vote
0
answers
57
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 ...
1
vote
0
answers
268
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
...
0
votes
2
answers
300
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 ...
2
votes
0
answers
314
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 ...