Questions tagged [jss]
For questions about the Sitecore JavaScriptServices module and JSS CLI.
592
questions
1
vote
1
answer
31
views
Sitecore Jss with Next Js : How to create and use dynamic placeholders?
I am learning Sitecore JSS with Next Js as the front end framework. I am working in Sitecore first approach with Sitecore 10.1. I was trying to develop a three column component which will have a ...
0
votes
1
answer
25
views
Unable to use JSS Site name
Background: I created a lot of JSS sites while I was learning Sitecore JSS with React integration. Also, I erased them. Currently, if I attempt to create a new JSS site, the CMS indicates that "A ...
0
votes
0
answers
47
views
Sitecore experience editor not opening in editing mode (Intermittent)
We are having a Sitecore 10.3 XM NextJS docker instance. Sometimes Our Experience editor not loading properly in editing mode(loading like a regular page). This is intermittent though.
This is an ...
0
votes
1
answer
41
views
JSS Deploy app -c -d failing with Status message : Bad Request
Analysis: After searching on Stack Exchange, I did not find the solution. I went through Import process fails : "Unexpected response from import service: Status message: Found" and ...
0
votes
0
answers
35
views
Getting error while running jss deploy app --acceptCertificate XX:XXXX:XXXX:XXXX:XXXX:XX [closed]
I am getting below error while running jss deploy app --acceptCertificate XX:XXXX:XXXX:XXXX:XXXX:XX
Unexpected error processing reply from import status service: TypeError: Cannot read property '...
0
votes
0
answers
43
views
Can we use Sitecore JSS with React remix?
We were wondering if it was possible to setup Sitecore JSS using React remix.
Sitecore version - 10.3
2
votes
0
answers
37
views
Extending or customizing XM Cloud - Sitecore Pages to support droplink editing
Is there a way to extend or customize Sitecore Pages to allow editing droplink or droptree in the side panel for XM cloud, similar to how we can edit the currently supported fields here https://doc....
0
votes
1
answer
53
views
Sitecore Forms with JSS, Custom Fields Submit Payload is not showing value
We have created a custom field for Sitecore Forms using JSS react. In the JSS file, we are using CustomFormFactory to render the input on the front-end side -
const myCustomFormFactory = ...
1
vote
0
answers
38
views
How to render link / text field as seamless button in Experience Editor
Imagine we have a link field ctaLink and a text field ctaText which are rendered as follows:
<div className={styles['cta']}>
<Link field={fields?.ctaLink as LinkField} className={styles['...
0
votes
1
answer
102
views
Provided SSC API Key is not valid
Likely a fringe case, but one that took a few days to track down.
If you get the following error response from the GraphQL UI:
"Error": "Response not Successful: Received Status Code ...
0
votes
2
answers
391
views
The expected type comes from property 'field' which is declared here on type 'IntrinsicAttributes & TextProps'
In terms of Sitecore NextJS, I'm a complete beginner. This problem is beyond my knowledge. Please assist me in resolving the following issues.
Complete Code:
import {
Text,
Field,
...
2
votes
1
answer
79
views
Is there a way to set fields on the Sitecore Headless / JSS Settings for the site via environment variables?
Prior to SXA-JSS you could define the JSS Site settings in the config and therefore be able to use environment variables for things like the serverSideRenderingEngineEndpointUrl.
Is there a mechanism ...
0
votes
1
answer
82
views
Implement Cookie and consent management in Sitecore Headless App
I implemented the Cookie and consent management functionality (Manage a contact's tracking consent choices (sitecore.com)) in the Sitecore 10.1 + Sitecore NextJS (18.0.0) using the Sitecore.Analytics....
0
votes
0
answers
30
views
What are the Sitecore Next.jss security recommendations for PUT and DELETE HTTP Methods Accepted?
We recently received recommendation that one of the Next.jss sites can be accessed via the URL https://yoursiteurl/sitecore.
As part of the Sitecore Next.jss setup, we keep the Sitecore folder at root ...
0
votes
0
answers
26
views
JSS Nextjs Generate Static Pages for Multiple Languages
We have Sitecore 10.2 + JSS (NextJs) and we have 12 languages for every page.
I know internationalization is implicitly marked as a "not supported" feature for next export command but is it ...
0
votes
1
answer
72
views
Multilanguage not working for headless | Sitecore NextJs URLs throw 404 for non English locale
URLs throw 404 when trying with another language, it's only working for en.
I can see the JSON response for it when accessing the API.
I have added language in CMS, setup the page for it and also ...
0
votes
0
answers
33
views
Placeholder: wrong renderings showing
in our JSS solution, I'm trying to insert a dynamic placeholder within our "main-placeholder", but it isn't displaying the allowed renderings I expect. It seems to be defaulting to a premade(...
0
votes
0
answers
28
views
What is the config for npm run start:rendering-host
The sitecore documentation talks about running npm run start:rendering-host but this is not the package.json of the sample application. What should this command be?
walkthrough--configuring-the-http-...
2
votes
1
answer
63
views
Experience Editor / preview mode throws error when viewing branch template items
I'm working on a SC 10.2 JSS site. On previous MVC projects I was always able to enter Experience Editor / Preview mode while building branch templates for pages. That is, the items such as /sitecore/...
0
votes
1
answer
36
views
jss start:connected mode error 'scjss-verify-setup' is not recognized as an internal or external command
I did a NPM install and it broke my jss start:connected mode.
I type jss start:connected and then it errors out. In the Package.json file it errors out on
"start:connected": "scjss-...
0
votes
0
answers
44
views
How to run JSS Angular App using SSR
Hi Im currently working on a JSS Angular application and have been tasked to deploy this within a docker container. After reviewing the Sitecore documentation it looks like this app will use SSR(...
0
votes
0
answers
41
views
How to remove Server HTTP Header from Sitecore GraphQL API response?
The Sitecore GraphQL API endpoint is returning Server HTTP Header in its response which has information on the hosting web server (IIS). This is a security issue as it gives the attacker information ...
0
votes
2
answers
45
views
Is Sitecore_Web_Index mandatory?
I have a Sitecore (9.3) JSS based Multisite environment (10+ regional sites). Each site has a separate index, as well as the Sitecore Web index and Sitecore Master index.
The Sitecore Web index now ...
0
votes
2
answers
67
views
Is Visitoridentification relevant in Sitecore Jss based Implementation?
Visitoridentification is important in Asp.Net MVC-based implementation, but I'm curious if Sitecore Jss-based implementations also require this to be enabled.
I observe that the Sitecore CD server is ...
2
votes
1
answer
73
views
JSS template field names: how to automatically serialize field names in camelCase?
I want to do the following:
Name template fields in the format "My Field Name"
Avoid filling out Display Name fields for each template field
Automatically serialize the field names in ...
0
votes
0
answers
58
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
34
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": "...
4
votes
2
answers
289
views
SXA headless with (partial) design: placeholder not found
I am using Sitecore 10.3 with SXA and JSS. For the head setup I used a post from Dan Cruickshank and that worked fine. I did get a nice blank homepage and no errors.
I created 3 partial designs and ...
0
votes
1
answer
158
views
Error while installing Sitecore in docker [duplicate]
I am trying to setup Sitecore 10.3 with docker containers.
While trying to run the .\up.ps1, I am facing below error with the certificate while building the containers:
Unable to load the service ...
1
vote
1
answer
64
views
GraphQL queries take time to execute and failed with Errors
Sitecore instance running on Sitecore 10.3, JSS, nextjs with Graphql locally, I did enable graphql master endpoint to execute graphql queries.
It was taking such a long time to execute simple queries ...
1
vote
0
answers
301
views
Sitecore JSS URL redirecting to not found
Getting the below error when browsing the app URL in connected mode:
On browsing https://xyz-app.dev.local it gets redirected to https://xyz-app.dev.local/sitecore/service/notfound.aspx
I can see the ...
3
votes
1
answer
188
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 [[.....
1
vote
1
answer
110
views
Incorrect ItemSearchResults generated by "jss graphql:update" command Sitecore 10.2
Can anyone help me with this issue?
Install NextJs app: npx create-sitecore-jss nextjs
jss deploy config, jss setup , jss deploy app
Install the Sitecore Headless Services package
dotnet sitecore ...
2
votes
0
answers
93
views
Mock useSitecoreContext in Nextjs unit tests
I'm trying to write simple unit tests with Jest and mock useSitecoreContext.
When I'm mocking the useSitecoreContext like this:
useSitecoreContext: jest.fn()
I'm getting an error "Cannot ...
5
votes
2
answers
270
views
How should security be handled for XM Cloud/Headless with Experience Edge?
In the Sitecore documentation for Experience Edge (used by XM Cloud), it states:
Experience Edge for XM does not enforce security constraints on Sitecore content. You must apply publishing ...
0
votes
0
answers
22
views
Setting up a development environment with the Sitecore 10.3 Containers template for Next.js [duplicate]
I tried to setup development environment with Sitecore 10.3 Container temmplate Next.js.
I follow this url : https://doc.sitecore.com/xp/en/developers/hd/210/sitecore-headless-development/walkthrough--...
0
votes
0
answers
53
views
Get Custom Multiple Field Value with Custom Submit Action
I am trying to implemented custom multiple fields with Sitecore Forms using Sitecore JSS. The UI is working as expected.
This is my Sitecore Form design
And this is the result.
The problem occurs ...
0
votes
2
answers
53
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
1
answer
79
views
How do you enable `/sitecore/api/graph/items/master` endpoint in sitecore jss nextjs
I have edge graphql endpoint enabled but I noticed that it doesn't do mutations, I'm trying to figure out how to enable the built in systemContent schema for my mutation requests.
Edit
I think it's ...
1
vote
2
answers
89
views
jss create command is not available in sitecore jss cli version 13
I'm trying to create new jss app for Sitecore 9.3. I have installed sitecore jss-cli version 13.0. When I try to create new jss app using "jss create" command nothing is happening. where in ...
0
votes
0
answers
31
views
How to setup/enable mutations in sitecore graphql [duplicate]
I noticed my GraphQL endpoint does not have mutation enabled out of the box. I don't know why.
See screenshot
I tried to look it up but I couldn't find any at the moment, so I thought I'd just ask ...
0
votes
1
answer
164
views
How to pass query variables in graphql
I couldn't find a way to pass query variables to my graphql query, I've made a query which I think is how I'd be able to do mutation
mutation UpdateItem($datasource: String!, $language: String!, $...
0
votes
1
answer
580
views
JSS/NextJS: how to disable SSL cert validation via ProxyConfig.proxyOptions.secure setting
I'm running in connected mode on my local and I want to disable SSL cert validation. According to the Sitecore docs, this option is mentioned:
... in the SSR application jss-proxy-ssr, in the config....
2
votes
1
answer
88
views
I can't access images from my containerized jss app but I can access them from outside, from my host (10.2 - with docker)
I'm rewriting the problem, to put more details.
I set up a jss app in a docker container. It's working fine, even the Experience Editor has already been put to work in this environment.
It turns out ...
3
votes
2
answers
126
views
Multi Language not working in Sitecore headless
We are using Sitecore 10.2 as headless (JSS) and nextjs for the front end.
When we try to call JSS API it is working with multiple languages.
https://{Sitecore}/sitecore/api/layout/render/jss/?item={...
1
vote
2
answers
88
views
unable to use space in field name like "Page Title" in sitecore with nextjs
I'm unable to use space in field name like "Page Title" in sitecore with nextjs.
in Layout.tsx it works like below but not working when have sitecore filed
like "Page Title":
const ...
0
votes
1
answer
190
views
Allow CORS request from CM to Rendering host
Related to Missing fonts when previewing Next.js app in Experience Editor.
I've got the Rendering container with SITECORE_API_HOST set to CD. In CM Experience Editor I see some CORS errors caused by ...
1
vote
1
answer
153
views
Unable to fetch Image with server url in GraphQL
I am using Sitecore 10.2 in my local as headless and nextjs for frontend.
I was trying experience editor, I was able to edit the components in experience editor.
Now Images are not showing in Site ...
1
vote
0
answers
139
views
Get URL for route item from Content List field
I have a field with a ContentList / Treelist of pages, each one of which I want the URL for.
Using JSS with Next.js.
If I inspect the field in the browser I can see the URL listed for each item as ...
0
votes
2
answers
202
views
making image editable in experience editor in sitecore jss with nextjs
I'm using Sitecore 10.2 in my local as headless and nextjs for FrontEnd. I'm able to open the home page on the experience editor and able to update content on Text/RichText html elements.
I'm using ...