Questions tagged [jss]

For questions about the Sitecore JavaScriptServices module.

Filter by
Sorted by
Tagged with
11
votes
1answer
2k 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.
9
votes
1answer
503 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
8
votes
2answers
202 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 ...
8
votes
1answer
637 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 ...
8
votes
1answer
1k 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....
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
166 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 ...
7
votes
1answer
604 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:...
6
votes
2answers
388 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
1answer
158 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
180 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 ...
5
votes
2answers
633 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
288 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
2answers
343 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 -&...
5
votes
1answer
302 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
110 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 ...
5
votes
1answer
152 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
287 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
129 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
1answer
367 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 ...
5
votes
1answer
110 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
66 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 ...
5
votes
0answers
251 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 }, ], ...
4
votes
1answer
288 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
95 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
36 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
143 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 ...
4
votes
1answer
117 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
284 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
143 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
84 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
103 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
68 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
1answer
48 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
1answer
94 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 ...
3
votes
1answer
322 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
239 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
238 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
317 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
234 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. ...
3
votes
1answer
135 views

500 Error Page for HTTPS connection in Sitecore JSS in Connected Mode

I'm trying to implement user authentication login and currently trying out to configure JSS connected mode to work with https (secure connection). Following https://jss.sitecore.com/docs/techniques/...
3
votes
2answers
121 views

Is Universal Tracker replacement for Sitecore.Analytics.Tracker or should they be used together?

I am trying to implement simle react app (non JSS) that uses Sitecore headless services. I want to have online personalization, let's say when goal is triggered during current interaction to show the ...
3
votes
1answer
119 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 ...
3
votes
1answer
113 views

Remove and/or rename fields in Sitecore JSS via template definitions

Is there is way to remove or rename a field in Sitecore JSS via template definitions? Even with an ID on the field, it won't rename. Deleting the field object will not delete the field in Sitecore. ...
3
votes
1answer
579 views

JSS Layout Service not returning items from datasource with query

I am trying to use the JSS service Layout API to get the items from a datasource specified in a control. When I set a specific item as a datasource, I do get the item fields. But when I use a query ...
3
votes
1answer
149 views

Hitting the Layout Service Endpoint Is Not Recording Analytics

I want to use the layout service endpoint that is a part of jss. If I make a request to the layout service endpoint should any analytics events be triggered by default? Currently it seems that making ...
3
votes
1answer
522 views

JSS deployment issue with react, using JSS Tech Preview 4

JSS deployment issue with react, using Tech Preview 4. Here is the complete log: PS F:\Drive\my-first-jss-app> jss deploy app -c -d JSS is creating a manifest for my-first-jss-app to ./sitecore/...
2
votes
1answer
405 views

Service based architecture in sitecore

I am analysing on the possibility of creating a web application using Sitecore where the web application is pure thin client using js based framework (knockout or angular) which can consume the ...
2
votes
3answers
283 views

Layout API returning strange code into placeholder

Here is my Sitecore tree Here is my data item in the experience editor (using the default Welcome component). I removed the Sitecore background image that was in the CSS. Here is what the layout API ...