Questions tagged [jss]
For questions about the Sitecore JavaScriptServices module.
376
questions
13
votes
1answer
3k views
What is JSS and how do I get started with building a JSS app?
I'm not 100% sure what JSS is and I want to experiment with some sample JSS apps and build a JSS app of my own.
11
votes
1answer
1k views
Experience Editor Support in JSS (headless)?
We're using Sitecore 9 for a greenfield project. One of the topics of discussion is whether or not we want to use EE vs. Headless. I'm not going to ask the pros vs cons of using one over the other, I ...
10
votes
1answer
862 views
How to add a route like app/payments/:id in JSS? react
How to add a route like app/payments/:id in JSS
and make a component receive the id to handle it
10
votes
1answer
3k views
Cannot query field “search” on type “Query”
I would like to display in a view a list of items provided by a search on GraphQL query.
Context:
Sitecore 9.1
Jss 11.0.0
Jss application template : Angular
Componant file heroes-connected....
9
votes
2answers
442 views
How to turn off “JSS Development Workflow”?
We recently switched from code-first to Sitecore-first in our JSS project.
In the Sitecore-first approach we now use Unicorn to serialize/sync Sitecore structure and content.
However the JSS ...
8
votes
2answers
328 views
What is alternative of “.PageMode.IsExperienceEditor” property in JSS-react?
What is alternative of .PageMode.IsExperienceEditor property of Sitecore.Context in JSS-react to verify the ExperienceEditor context ?
8
votes
2answers
2k views
How does Sitecore JSS impact backend Sitecore development process
Context:
Currently we use Angular JS but our front end team wants to use reactJS as strategic platform. Until Sitecore JSS came out; I had been telling them that Sitecore doesn't support it.
I read ...
7
votes
1answer
1k views
Sitecore 9 JSS implementation
We want to use JSS (https://jss.sitecore.net/#/) for headless development and there are a couple of things that are not very clear in the documentation.
We want to preserve XP Editor functionality. ...
7
votes
2answers
1k views
“Could not find JSS app configuration” error during JSS import
I'm attempting to import one of the JSS sample applications and I'm getting the following error after running the npm run package command:
Fatal error occurred while running import process.
Exception:...
7
votes
1answer
244 views
Update YAML Route Files as same as Connected mode, while working in Disconnected Mode
How can I update my YAML files for local disconnected mode development from Sitecore, as same as Connected mode. As We have a team who is working on Sitecore and another team is working on front-end ...
6
votes
2answers
587 views
Seeing Experience Editor markup instead of an editable field when using Sitecore JSS with React
I'm trying to output an editable field in a component of my React-based Sitecore JSS application:
import React from 'react';
import PropTypes from 'prop-types';
const AwesomeComponent = ({ fields }) ...
6
votes
3answers
876 views
The term 'jss' is not recognized while installing JSS
I'm trying to install JSS on a VM. When I run the install code, I get the following warnings:
PS C:\dev> npm install -g @sitecore-jss/sitecore-jss-cli
C:\Users\sitecore\AppData\Roaming\npm\jss -&...
6
votes
1answer
275 views
Error in component using integrated GraphQL search query “Cannot read property search of undefined”
Component definition
export default function (manifest) {
manifest.addComponent({
name: 'Navigation',
graphQLQuery: `
query NavigationQuery {
search(
fieldsEqual: [
...
6
votes
1answer
177 views
Executing graphQL in disconnected mode
I am creating a JSS application in code first approach, so I always test the components in disconnected mode. As I have proper route files, all the pages are working as expected in the disconnected ...
6
votes
1answer
467 views
Understanding the overhead involved with routes and definitions
I'm enjoying JSS so far but have some general questions about what I perceive as "overhead" work involved in setting up the routes, component definitions and such.
If I want to add a component, this ...
6
votes
1answer
423 views
Adding component with inner placeholder breaks placeholder settings
I have component
manifest.addComponent({
name: 'MyComponentWithPlaceholder',
icon: SitecoreIcon.DocumentTag,
fields: [
{ name: 'heading', type: CommonFieldTypes.SingleLineText },
],
...
5
votes
2answers
1k views
Headless CMS : Sitecore vs Contentful
We are currently using Sitecore for one project but did not use JSS anywhere. Other project team plans to use headless CMS and considering "Contentful" CMS for this.
Could anyone please explain the ...
5
votes
1answer
449 views
Code first Rendering Parameter templates
What is the best way (if any) to add a rendering parameter template to a rendering using JSS?
I have looked at some of the import processors, but canāt find a simple way of doing this from javascript.
5
votes
1answer
386 views
Sitecore JSS components and Sitecore MVC components in a single Experience Editor page
Can you use Sitecore JSS components with Sitecore MVC components in the same Experience Editor page? If this does work, does it work with dynamic placeholders?
An example might be adding a Experience ...
5
votes
1answer
382 views
Graphql image size
I am implementing Sitecore jss on Sitecore version 9.1.
I was wondering if there is a way to specify the image size (width/height) when querying using GraphQl.
Below is my current query which is ...
5
votes
1answer
439 views
On content delivery server, /-/jssmedia link breaks, /-/media link works
We have deployed a jss app to a Content Delivery server.
We have followed instructions to add jss support to the server role.
Links to media items generated by Image components begin with /-/...
5
votes
1answer
495 views
Sitecore Experience Accelerator (SXA) site won't render as a sub route where JSS app is the root app
We have a JSS app as our site root (e.g., mydomain.com/ renders my JSS app) and want a Sitecore Experience Accelerator (SXA) website as a sub-route of the same domain (e.g., mydomain.com/sxa-site).
...
5
votes
1answer
181 views
JSS, is there a way to create custom types?
I am totally new to Sitecore, and a front-end developer, so please bear with me.
I'm on a project that is prototyped using JSS and for some of our components we'd like to define custom types like: "...
5
votes
4answers
542 views
Datasource Location not working as expected
I created a rendering for my form and linked the datasource location to sitecore/forms (which should be correct).
The mysterious thing about this is that when I select my rendering in the experience ...
5
votes
1answer
125 views
Providing “deeper” data to placeholders
My understanding is that the fields structure in routes data should be fairly flat, having just the fields and then a value beneath.
Example:
---
name: about
placeholders:
appname-main:
- ...
5
votes
1answer
360 views
How to generate Sitecore Media Handler Hash?
How can I generate Sitecore Media Handler Hash to append it to URL in JSS? I'm trying to resize the image on the fly but image URL query string like
/blah/blah/myimagename.jpg?w=548&h=202
...
4
votes
1answer
382 views
How to define JSS component in YAML without DataSource Template
I need to define a component in YAML manifest files in Sitecore JSS CodeFirst approach, where component doesn't have any "Data Source Template" field populated.
In this case, NO template should be ...
4
votes
1answer
646 views
How can I get the current URL in the SSR of a page
In my layout.js file, I get the current URL of the page with this code:
url: typeof window !== 'undefined' ? window.location.href : '',
On first request of this page from the server, the url is set ...
4
votes
1answer
303 views
Sitecore license for JSS
I have to do a POC in Sitecore JSS. I understand Sitecore 8.2 license can be used with Sitecore 9.1 but I need to know if I can work with JSS using my existing Sitecore 8.2 license?
4
votes
1answer
131 views
Not able to create API keys for JSS App in core database - Sitecore 9.1 and JSS
I am playing around with JSS App with Sitecore 9.1.0 (rev. 001564). I have followed the youtube video for Build Your First JSS App and I have been stuck at one point where I need to create the API ...
4
votes
1answer
412 views
Sitecore Layout Service is returning 400 Bad Request for JSS requests
I have followed all the steps in the JSS Server Setup guide:
https://jss.sitecore.com/docs/getting-started/jss-server-install
And I have followed all the steps in the Configuring the Sitecore server ...
4
votes
2answers
167 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 ...
4
votes
1answer
297 views
In JSS Integrated Mode, how can I log errors / console output from Node to a custom logger instead of the Sitecore log?
By default, the JSS Node.js rendering engine captures console output / errors emitted by the Node instance(s) rendering your JSS app and logs the output / errors to the default Sitecore log.
I would ...
4
votes
1answer
481 views
How would you best configure JSS to work with multiple Sitecore <sites>?
One of the key benefits I can see from moving to JSS is the way developers can work with the different tools. In particular the lure of Hot Module Replacement (HMR) adds such a lot of positives for ...
4
votes
1answer
177 views
Sitecore, JSS and GraphQL: licensing question
The question is pretty simple: can I use the GraphQL from JSS package without JSS license?
4
votes
1answer
147 views
“Could not find JSS app configuration” when deploying JSS app into JSS-SXA Site
In a JSS with SXA instance...
Create JSS Tenant
Create JSS Site
Attempt to import JSS app using jss deploy app -c
Error
Unexpected response from import service:
Status message: Bad Request
Body: ...
4
votes
1answer
274 views
Nesting placeholders in Standard Values
I know (and I do it) that I can put a default value in a placeholder so that when I create a new item for my route type it populates my placeholder with a component that I will choose.
I do it like ...
4
votes
1answer
131 views
Want to skip content during code-first deployment
I would like to avoid my content comrades from being unhappy and overwrite changes. Can I skip content from JSS package?
Good day.
4
votes
1answer
261 views
JSS layout api returns 404 when item requested by display name
We are trying to use display names for URLs and it doesn't work with JSS.
E.g. we have a page "search" which has a display name in NL: zoeken.
when I request http://localhost:3000/en/search , the JSS ...
4
votes
2answers
565 views
In Sitecore JSS Multisite we will have an jss app for each Site?
We want to use Sitecore JSS (ReactBased) Framework with Sitecore 9.2 (Integrated mode).
We will have 3 sites that are almost the same but they have their differences in components and content (they ...
4
votes
2answers
44 views
Sitecore form save data action only creates one form entry for multiple submissions
We have a form on our JSS site's home page. When submitted, it uses sitecore's built in "Save data" action. However, it looks like when you submit the form multiple times, all rows in the ...
4
votes
1answer
207 views
GraphQL Search facetOn Parameter
I'm trying to use the Sitecore GraphQL search function that takes in the "facetOn" parameter. Unfortunately I'm not having much luck with the results, and I suspect it's because I'm doing something ...
4
votes
0answers
206 views
Sitecore JSS integrated mode performance tuning
I hope you all are doing well and safe.
Today I am here to ask a question specific to Sitecore JSS performance.
Category - Sitecore JSS integrated mode, performance issue
Sitecore Version - 9.2, ...
3
votes
2answers
1k views
Unexpected response from import service: Error: unable to get local issuer certificate
I have version 9.0 update 2 and am working with the sample JSS app. I used the this same app on an earlier environment which was setup as Standalone and had no issues. This is a remote deploy to a ...
3
votes
1answer
697 views
Whatās the best practice to Expose Sitecore 9 APIs for Mobile Apps Development? [closed]
Currently, I am looking Sitecore CMS solution for native mobile app development.
Mobile App Team is using Swift for IOS and Java for Android.
So we have a limitation to use JSS react native for ...
3
votes
1answer
497 views
Profiling Sitecore 9.1 JSS Server-Side-rendering node server
JSS site is running in integrated mode on Sitecore 9.1
I have problem with the SSR node process, it's hanging around 18 min on load tests and results in error 500 for site.
For blind solution I ...
3
votes
1answer
293 views
JSS Layout Service and Personalization
When using the JSS Layout Service with my Angular application, I notice that if I add personalized content to my component, the response (and display) I get back from the Layout service depends on a ...
3
votes
1answer
426 views
How JSS Rendering components bind to physical file
Once code-first JSS solution is deployed to a running sitecore instance, we can see rendering items created under Rendering folder in Sitecore content tree.
But, Only Component Name field is ...
3
votes
1answer
201 views
Is graphQL data editable through Experience Editor
We are working in JSS integrated mode, in one of the page we need to retrieve the child items from a folder and render them. As we are implementing the site in integrated mode, we expect the features ...
3
votes
1answer
352 views
Install jss package (layout service) on content delivery server
I'm developing a Sitecore ssr with jss on azure using two app instances. One for content management and one for content delivery.
I installed all the jss packages on content management and it works. ...