Hot answers tagged

11 votes
Accepted

How to configure multisite in Sitecore Next.js application?

This depends entirely on your requirements. Separate applications would enable you to develop, deploy, and scale sites independently. Components and other code could be shared via npm packages. A ...
nickwesselman's user avatar
5 votes
Accepted

Current project does not support file deployment into Sitecore instance

At this point it is possible to use this approach below for nextjs app if it is needed to use Sitecore capabilities: jss start:connected After that, you can open the home page in Experience Editor, ...
Alexander's user avatar
  • 1,273
4 votes
Accepted

NextJs JSS Setup Error generating manifest Error: Unable to load manifest require

finally not clicking space will skip the manifest file.
SNew's user avatar
  • 151
4 votes

making image editable in experience editor in sitecore jss with nextjs

The JSS NextImage component is a field rendering helper component that you use to display images configured in Sitecore fields with a Next.js Image component. The JSS NextImage component uses a custom ...
Mahendra Shekhawat's user avatar
4 votes

Multi Language not working in Sitecore headless

You would also need to configure the language on the frontend in the next.config.js file: i18n: { locales: ['en', 'da-DK'], }, Here is the official documentation: https://doc.sitecore.com/xp/en/...
Tamás Tárnok's user avatar
3 votes

How could we apply Hybrid (SSG and SSR) rendering with Sitecore Nextjs

An easy way to apply hybrid rendering (SSG and SSR) with Sitecore and Next.js, you can utilize different routes and configurations. First, for your default routes, you can leverage static site ...
André Moraes's user avatar
3 votes

unable to use space in field name like "Page Title" in sitecore with nextjs

I think a good practice to reduce complications is to ensure field names have no spaces. For content author readability, you can add the spaces in the Title field of the field item (think of it like ...
Rishiraj Shekhawat's user avatar
3 votes

unable to use space in field name like "Page Title" in sitecore with nextjs

I think this is expected behavior as the field name will get directly served as a property on the javascript side which would not work with spaces in the middle of it. What you can do as a workaround ...
Elena P's user avatar
  • 616
3 votes
Accepted

Missing fonts when previewing Next.js app in Experience Editor

Tell your NextJS app to render the fonts using absolute URL. We did it in our app by setting the PUBLIC_URL variable to the base URL of our app, which in your case, https://www.myapp.localhost. You ...
chenz's user avatar
  • 186
3 votes
Accepted

Fields not editable in Sitecore Experience Editor when using GraphQL

Thanks a lot Trayek for your response as it helped me to get resolution. I made changes on both GraphQL query and NextJS component in order to make it working. Now I'm able to edit fields using ...
Erwin Paul's user avatar
3 votes

Fields not editable in Sitecore Experience Editor when using GraphQL

Use the jsonValue instead of value on your TestProps and query. So your TestProps would look something like this: type TestProps = ComponentProps & { fields: { data: { TestComponent: { ...
Trayek's user avatar
  • 1,197
3 votes
Accepted

Extend GraphQL schema for custom field

We had a similar challenge some time ago and we contacted Sitecore Support. Sitecore support summary: The Edge schema provider doesn't actually use the "fieldTypeMappings" configuration ...
Anton's user avatar
  • 3,771
3 votes

Next Js create app JSS command

I tried this on my local using these steps. You need to run this command before creating your app. npm install @sitecore-jss/sitecore-jss @sitecore-jss/sitecore-jss-nextjs Now use this command to ...
Sumit Bhatia's user avatar
  • 4,686
3 votes
Accepted

Next.js, Pages Still Generated When Components Error

It is correct that getStaticProps DOES in fact not validate a page that it receives an error on. The issue is that Sitecore swallows the errors that occur within components: Therefore, when ...
jrap's user avatar
  • 4,861
3 votes
Accepted

Error : TypeError: Class extends value undefined is not a constructor or null

I suspect nvm version 12.15.0. I tried your command with node version 18.12.1 with my local and it worked for me. I would recommend trying the latest node version and following the steps below. ...
Sumit Helaiya's user avatar
2 votes
Accepted

Unable to login to the sitecore.demo.edge site after installing

If you are setting up Sitecore Demo Edge website on your local, to login to Sitecore CMS use the below credentials: User name: superuser Password: the password you set in the .env file (eg. 'b') If ...
Raman Gupta's user avatar
  • 2,389
2 votes
Accepted

SSR Component Level Data fetching in JSS?

The problem is mixing and matching SSR and SSG between components and pages. If your page is SSG, you must set your components to SSG also, to use SSR on your component, your page must be SSR. Full ...
Richard Seal's user avatar
  • 20k
2 votes

making image editable in experience editor in sitecore jss with nextjs

This is what I'm using, and I am able to edit my images: interface Fields { data: { item: { pageTitle: { jsonValue: string }, Text: { ...
Trayek's user avatar
  • 1,197
2 votes

Editing content on Experience Editor on master db and fetch data from web db for Sitecore JSS with NextJS

Just follow the tips in the config file that you have: IMPORTANT: JSS sites ship in 'live mode', which makes development and testing easy, but disables workflow and publishing. Before going to ...
Anton's user avatar
  • 3,771
2 votes
Accepted

How to get 404 status code on Rendering host

When a new Next.js app is create a default 404 Page file is created. This file is statically generated at build time. import NotFound from 'src/NotFound'; const Custom404 = (): JSX.Element => <...
Vlad Iobagiu's user avatar
  • 18.2k
2 votes
Accepted

Sitecore JSS URL redirecting to not found

In xyz-app.config add the following to the app registration section (doesn't matter where in the list of values): <app name="xyz-app"... ... serverSideRenderingEngineEditOnly="...
Jamien's user avatar
  • 36
2 votes

The expected type comes from property 'field' which is declared here on type 'IntrinsicAttributes & TextProps'

You need to use something like this <Text field={element?.fields?.SubTitle as Field} />
Srikar's user avatar
  • 41
2 votes
Accepted

Error: GraphQL Error (Code: 401): {"response":{"error":"Unauthorized","status":401

It seems due SITECORE_API_KEY environment variable in the (.env or .env.local) file is not updated with proper Edge token or sitecore api key, Please update and give a try. Thanks
Nelson's user avatar
  • 46
2 votes
Accepted

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

Here is an example of how you can create a custom processor to remove the lang cookie for Layout Service requests: Create a new class that inherits from JssGetLayoutServiceContextProcessor. Override ...
Vishal Khera's user avatar
2 votes

Issue on Submit Action for Sitecore Forms in NextJS app

Finally, I found the solution which is mentioned here; https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1002853 Basically, for the newly created app, one more config needs to ...
Ashish Chavan's user avatar
2 votes

Sitemap.XML for Sitecore JSS NextJS using SXA

If that works on local and not on Vercel, then I suspect its related to configuration (as you said). Here are details of how its implementation uses configuration and you can check those. With SXA ...
Vikrant Punwatkar's user avatar
2 votes

JSS deploy config to XM Cloud failed

Please make sure you are following the correct documentation and using the correct github repository. The xmcloud work differently and you need to use Sitecore CLI for deployment. Getting Started: ...
Ghodrat Ashournia's user avatar
2 votes

Self-hosting nextjs

Refer to this official document links for Deployment options for JSS Next.js apps. Node.js Server Next.js JSS apps can be deployed to any hosting provider or environment that supports Node.js. For ...
Sumit Helaiya's user avatar
2 votes

XMCloud Vercel app Redirect URL from uppercase to lowercase

We have achieved this by creating a custom middleware function. Create a file for your custom middleware, let's say smallcase-url, in your project's directory, such as src/<appname>/src/lib/...
Raman Gupta's user avatar
  • 2,389
1 vote
Accepted

How do you enable `/sitecore/api/graph/items/master` endpoint in sitecore jss nextjs

To enable the graphQL endpoint to try the below steps Download and install packages. For use of Sitecore JSS with versions of Sitecore prior to 10.1 https://dev.sitecore.net/Downloads/...
Sumit Helaiya's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible