Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [nextjs]

Questions related to Next.js in Sitecore context should be considered into this tag.

Filter by
Sorted by
Tagged with
1 vote
2 answers
74 views

Source query For General Link Field Type

We need to use a source query for the General Link field type to display only the current page's data. In Sitecore XM Clould, is there any way we can achieve it from the front code (NextJs) as the ...
shrutika shete's user avatar
1 vote
2 answers
36 views

ERR_HTTP2_PROTOCOL_ERROR while changing the Layout in Sitecore Headless SXA 10.3

We are working on Sitecore 10.3 SXA (Headless with Next.js). While trying to change the layout of a site, we are getting (failed)net::ERR_HTTP2_PROTOCOL_ERROR while accessing the Layout Service. Are ...
Hari Prasad Kotha's user avatar
0 votes
0 answers
24 views

Error Boundary not working in Sitecore JSS with Next.js Project

I am using Sitecore 10.3.1 with JSS-Next.js app version 21.5.3 and Node version 21.7.3. My requirement is to handle client and server errors at the component level. I am currently using the "?&...
Saiprasad's user avatar
2 votes
1 answer
51 views

"Component GraphQL Query" field is ignored in Experience Editor

I installed the Sitecore 10.4 with Headless SXA and I noticed a strange behavior. On the components which has a "Component GraphQL Query" this field is ignored. On a 10.3 solution Link List ...
Vlad Iobagiu's user avatar
  • 18.6k
2 votes
0 answers
30 views

How to split JS bundles by page

On our JSS/Next.js site, we are running into an issue issue with poor PageSpeed performance scores, which are mostly attributable to large JS bundles. They're so large because we have one large main....
Marcel Gruber's user avatar
1 vote
1 answer
45 views

Using Next.js with the RestLayoutService

I've been doing some experiments with the XM-Cloud-Introduction GitHub repo. I followed all the Running the Repository steps for Full Local Development Mode. It's working and I also run the ...
Jeroen Breuer's user avatar
2 votes
1 answer
86 views

Issue with XM Cloud Environment Variables in Next.js

I am facing an issue getting an environment variable value from Sitecore deployment app in my Next JS application. I've set an environment variable XMC_DEFAULT_RH in my XM Cloud instance Deployment ...
Atul Gusain's user avatar
1 vote
0 answers
26 views

Fetch LayoutData from either Sitecore 10.3 instance or XM Cloud Instance based on a condition provided by a 3rd party SDK

Long time Front-end specific Sitecore developer, first time question asker on this particular stack exchange. Hopefully, the title explains what I'm after somewhat, but we currently have a Sitecore 10....
Michael D's user avatar
0 votes
1 answer
49 views

Sitecore + next.js 301 redirects

Is there a way to handle (receive in the middleware for example) 301/302 status code from Sitecore server returned to next.js as a response for Layout service call? I used to use custom Node based ...
Lukasz123123's user avatar
2 votes
1 answer
64 views

Next.js - multisite + multilingual pages without locale within URL

How do you approach multisite and multingual site configuration without locale within URL? The problem I am facing is that i18n configuration requires to define 'defaultLocale'. I would like to ...
Lukasz123123's user avatar
0 votes
1 answer
71 views

How to get details of selected item in Droplink used as a rendering parameter in next js in Sitecore XM Colud

I have a Droplink field in rendering parameter and I want name of selected item in Droplink in nextjs. I get guid id of the selected item of Droplink in params in nextjs but not other details of the ...
Bhupesh Khandelwal's user avatar
0 votes
1 answer
50 views

How to create a composite container in Sitecore XM Cloud / Next Js

In MVC, composite container like Tabs component has defined layout on each tab item and it processes on partial pages. In XM Cloud / Headless solution, I am able to create a separate layout on my tab ...
Hanz Kristopher Enriquez's user avatar
0 votes
2 answers
63 views

Sitecore XM Cloud Language Fallback Works in Experience Editor but Not in Headless Application

I configured the Arabic language version at the site level and selected the English as the fallback language. Then, enabled the item language fallbackand language fallback. After that,created the ...
Suresh R's user avatar
  • 349
2 votes
1 answer
82 views

Error: Editing data cache miss for key; Unable to get editing data for preview {"key":"<GUID>"}

After upgrading from JSS 20 to JSS 21, we are unable to open pages in Experience Editor. Our rendering host is Vercel and there are several errors in the logs: Error 1: T', maxHeaderSize: undefined,...
jrap's user avatar
  • 4,951
0 votes
1 answer
71 views

How to handle client or server side errors that occurred in placeholder renderings

I am new to both Sitecore and next.js 13.5+ I created a scaffolded nextjs jsssitecore application using npx create-sitecore-jss nextjs I am trying to create centralized error boundary. When there are ...
SSC's user avatar
  • 1
1 vote
0 answers
53 views

Deploying next js to production (on VM)

Is there any guidelines from Sitecore that shows how I can deploy my next app to a VM. The documentation website is talking about Vercel mainly, but what if I want to deploy it to a windows VM, assume ...
Jose's user avatar
  • 63
2 votes
1 answer
46 views

What's the best way to register components into the component builder from other directories?

I'm working on a monorepo solution which would have a set of Shared components one level above the site folder. I'm looking at updating scripts\generate-component-builder\plugins\components.ts per the ...
Mark Gibbons's user avatar
  • 5,632
0 votes
0 answers
49 views

Unable to access subpages in multisite NextJS+XM Cloud

So I have 2 sites under 1 project. My project was created by using https://github.com/sitecorelabs/xmcloud-foundation-head which already had multisite plugin installed and I'm able to setup the ...
rayray's user avatar
  • 81
0 votes
1 answer
187 views

How to setup Multisite in NextJS for XM Cloud [duplicate]

my XM Cloud project was setup by following https://github.com/sitecorelabs/xmcloud-foundation-head. So by default all the multisite plugin has been setup. I'm able to see the list of available sites ...
rayray's user avatar
  • 81
1 vote
1 answer
79 views

Deploying a JSS App Next JS to Scaled Sitecore environment (Production)

Hello Everybody I am working on a Next Js App over Sitecore it is working fine locally the app is created and working on Localhost but now I need deploy the App to production I have a Sitecore 10.3 ...
Andrew Hany's user avatar
2 votes
0 answers
45 views

How to figure out which rendering is causing "Error serializing .componentProps[] returned from getStaticProps, undefined cannot be serialized as JSON

I've got a prerendering error that's breaking my builds, and I can't figure out how to track down where in the code the issue is because the error message is so generic when this happens: Error: ...
Erica Stockwell-Alpert's user avatar
3 votes
2 answers
114 views

deploying next.js JSS app to sitecore

I have installed sitecore 10.0.3 on premise on dev server (remote desktop) and created next.js Jss app and connected the app with sitecore, now i have the app running and i can access the site from ...
shimaa elsayed's user avatar
1 vote
1 answer
162 views

Redirect middleware not working

I wanted to try out the redirects module from SXA though something is quite not right. I created the redirect maps on the Site and republished the Site item as I’ve read in an existing question here ...
Lala's user avatar
  • 396
1 vote
1 answer
252 views

Next.js Multisite Add-on not working in local containers because of CORS issues

Wondering, has anyone at all managed to make Next.js Multisite add-on work well? I spent lots of time trying to overcome a CORS issue, which I don't know how to solve. There is a troubleshooting guide,...
Martin Miles's user avatar
2 votes
0 answers
136 views

Modify the domain name for media items in XM Cloud

On our XM Cloud site built using Nextjs the URL for media items is structured as follows: https://edge.sitecorecloud.io/prod/media/project/videos/video1 and it currently works correctly. However, my ...
Aditya Gautam's user avatar
1 vote
1 answer
257 views

How to Handle 500 error Page in Sitecore Headless

I have created a custom 500.tsx page under the pages folder. But still, I am unable to get my 500 page working, instead, it shows the default error message. I have tried deleting my custom 500 pages ...
Manoj's user avatar
  • 363
3 votes
2 answers
172 views

RSS Feeds in NextJS Application

We've got a Sitecore headless project using NextJS. I've setup an rss feed using the OOTB Sitecore RSS functionality and it seems to be generating the correct xml when I view it through EE or preview. ...
Paul Schofield's user avatar
1 vote
0 answers
96 views

Rendering container fails to start: system cannot find the file specified

I am adding a rendering service/container to my solution. I see this error from the rendering container when running docker compose up: Error response from daemon: container ...
Marcel Gruber's user avatar
0 votes
1 answer
131 views

NextJs - template issue

I am trying to setup Sitecore Containers template for Next.js using this guide from the official docs. Everything works fine, no errors under installation or deployment jss app to Sitecore. On my home ...
Daniel's user avatar
  • 3
0 votes
0 answers
46 views

hostname could not be parsed error when hitting custom MapHttpRoute

I am running Sitecore (10.2)/SXA backend in Docker. I am running NextJS directly on my host machine via npm run start:connected. On upstream environments, when I hit /export/doc?id=xxxxxxx, a file is ...
Marcel Gruber's user avatar
0 votes
1 answer
270 views

POSTing to localhost:3000/api/editing/render results in error "Unable to extract editing data from request"

I am doing some troubleshooting with my Sitecore(10.2.1)/NextJS(12.3.1)/JSS(20.0.3)/Docker setup. I am running my backend in Docker and my front end via npm on my host machine. I am POSTing to http://...
Marcel Gruber's user avatar
2 votes
2 answers
167 views

XMCloud Vercel app Redirect URL from uppercase to lowercase

We have an XMCloud application using NextJs, which we are deploying to Vercel. On the Vercel side, it is working fine. We have a requirement where if someone is adding uppercase/Camelcase in the URLs ...
Mahendra Shekhawat's user avatar
0 votes
1 answer
82 views

how to setup docker in local machine after setup sxa headless application

I have Sitecore SXA Headless with a Next.js application running on my local machine. Now, I want to set up Docker for this application. Could you please provide steps for this? Sitecore version: ...
PKH's user avatar
  • 485
0 votes
0 answers
40 views

Headless (NextJS) Component not working when added to Sitecore XM cloud Page Designs [duplicate]

We are facing issue with the few our Headless component created in NextJS for Sitecore XM cloud implementation where nested component is created which ultimately render some code like below. ...
Nikhil Kulkarni's user avatar
2 votes
1 answer
208 views

Next.js multisite plugin context is not returning rewrite path

I am using next.js multisite plugin https://doc.sitecore.com/xp/en/developers/hd/21/sitecore-headless-development/the-next-js-multisite-add-on.html I have configured 2 sites in env.sites, cft and ...
Bala Grorrepati's user avatar
0 votes
0 answers
363 views

Vercel Middleware does not run on home page when using config/matcher

I've got a multilingual JSS / Next.JS site. I am integrating Vercel Middleware and looking to exclude certain paths from the middleware without invoking middleware in the process of checking. As a ...
Marcel Gruber's user avatar
1 vote
1 answer
226 views

graphql-let codegen giving JavaScript heap out of memory exception

We are working on Sitecore 10.3 with Next.js on Docker. In one of our components, we are trying to get the data from Sitecore. We added a graphql query by creating a file called NavigationIntegrated....
Sumit Bhatia's user avatar
  • 5,095
2 votes
1 answer
340 views

Self-hosting nextjs [closed]

I couldn't find any information online how this can be done with sitecore. All documentation talk about hosting it on third-party providers such as Vercel or Netfliy. But it says next js can be hosted ...
Jose's user avatar
  • 63
1 vote
0 answers
89 views

Separate Editing host for Sitecore Headless application in local docker setup

I am trying to create the separate Editing Host (Next.js) for container setup. Sitecore version: 10.3 without SXA Sitecore JSS Next.js SDK version: 21.2.4 without SXA Multi-site add-on For this I ...
Amit Kumar's user avatar
0 votes
0 answers
43 views

Chunks/Page<>.js not loading in a Sitecore 10.2 SSG + NextJS after NextJs upgrade

I am looking for some guidance around upgrading NextJs and ReactJs on the with Sitecore 10.2. Please find below the details for the implemetation: Sitecore 10.2 with "Sitecore Headless ver 20.0....
Debasis Mishra's user avatar
0 votes
0 answers
90 views

Sitecore 10.3 JSS 21.0.1 Next.js - Unable to register fields for nested props in manifest definition

I am new to the Sitecore. I have created the Next.js application in disconnected mode. I am trying to register below props in component definition file. fields: { NewsCards: { PreviewImage: ...
pvn sreedhar's user avatar
1 vote
1 answer
198 views

JSS deploy config to XM Cloud failed

I'm using Sitecore XM Cloud environment, and I setting up my next.js app to connect to Sitecore editors. I'm currently following this article. After setting up the configuration file and run jss ...
WenHao's user avatar
  • 213
1 vote
1 answer
494 views

Getting error "Ensure that there is only one instance of "graphql" in the node_modules directory"

I am trying to create a Sitecore JSS app for Sitecore 10.3 with nextjs template. I keep getting the error below when I try Jss start command. I am trying to run this in disconnected mode with REST. My ...
Padmaja's user avatar
  • 11
1 vote
1 answer
171 views

Sitecore Forms with NextJs and Hybrid SSG + SSR rendering

I am new to Sitecore JSS and am trying to the implement Sitecore Forms using the hybrid rendering approach [SSR+SSG] in a Sitecore 10.2 with NextJs app. Some selected paths would be SSR rendered and ...
Debasis Mishra's user avatar
0 votes
1 answer
108 views

Excessive next builds and deploys (triggered by publish webhooks) for SSG

The Sitecore docs on deploying JSS Next.JS sites to Vercel state that you must trigger a next build and site deployment via webhook on publish in order to pre-render the site with static site ...
Marcel Gruber's user avatar
0 votes
1 answer
223 views

Sitecore XMC NextJS Wildcard Pages

Sitecore NextJS, XM Cloud I need to query an API and get a list of Authors. Let's assume there are 1000 authors. In Sitecore, I created a folder called Authors and an item of template AuthorDetails ...
Anthony Fernandes's user avatar
0 votes
2 answers
398 views

Sitemap.XML for Sitecore JSS NextJS using SXA

We are working on 10.2 Sitecore JSS (NextJS) using SXA. We have enabled Sitemap.xml in Sitecore using OOTB SXA settings. We can see sitemap item at this path /sitecore/content/TenantName/Home/Settings/...
Raman Gupta's user avatar
  • 2,569
0 votes
0 answers
156 views

How to dynamically import a component in sitecore jss inside next js application?

I know the conventional way of dynamically importing a component : const Report = dynamic(() => import('PowerBIComponent'), { ssr: false, }); But since application uses [...path] to catch ...
Nishant's user avatar
0 votes
0 answers
177 views

Server Error TypeError: Cannot read properties of null (reading 'key') i18n/graphql-dictionary-service.js

I am running Sitecore 10 locally with Next.js The site works fine in Experience Editor but in normal mode i.e. http://localhost:3000/ I started getting this error below. Tried everything but in vain, ...
Zaheer Tariq's user avatar
2 votes
1 answer
627 views

Rendering host container returns 500

Whenever I try to access my local Sitecore instance in the Pages editor, it shows an error: Connection to rendering host http://rendering:3000/api/editing/render failed with the following error: The ...
Lala2022's user avatar