Questions tagged [nextjs]
Questions related to Next.js in Sitecore context should be considered into this tag.
91
questions
1
vote
1
answer
40
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 ...
0
votes
0
answers
22
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 ...
0
votes
0
answers
32
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....
1
vote
1
answer
69
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 ...
1
vote
0
answers
25
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 ...
0
votes
0
answers
25
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....
0
votes
0
answers
24
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: ...
1
vote
1
answer
49
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 ...
1
vote
1
answer
101
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 ...
0
votes
1
answer
72
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 ...
0
votes
1
answer
53
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 ...
0
votes
0
answers
47
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 ...
0
votes
2
answers
150
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/...
0
votes
0
answers
67
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 ...
0
votes
0
answers
81
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, ...
2
votes
1
answer
117
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 ...
1
vote
1
answer
35
views
Error Rendering Sitecore.JavaScriptServices.ViewEngine.Presentation.JsLayoutRenderer: An item with the same key has already been added
I am using Sitecore 10.2. I am able to run my sample nextjs application in connected mode using the command in VS Code terminal jss start:connected.
But I am not able to open my application in local ...
0
votes
0
answers
15
views
Not able to create manifest file .PFA in sitecore jss with next.js [duplicate]
I am trying to integrate sitecore-jss with next.js, when I am trying to run the below command 'jss deploy app --accept certificate 426a2098ef89941dec9f277a4bc1ef677f555a4a -c -d'
getting not able to ...
0
votes
0
answers
75
views
XMCloud + NextJS 13 AppRouter implementation
We are implementing a headless solution with XMCloud and NextJS. We noticed that sitecore lab sxa-starter already had an example for next 13, but it does not implement AppRouter yet (App Router | Next....
1
vote
1
answer
44
views
Local CM site Experience Editor fetches NextJS static assets from Vercel instead of local
I have a local install of NextJS & SC 10.2. The site is running via docker with a setup that is mostly similar to this example:
https://github.com/Sitecore/docker-examples/blob/develop/getting-...
0
votes
0
answers
26
views
Unable to access 'FileProperties' JSON of document uploaded to Content Hub DAM to retrieve file extension
Running Sitecore.NET 10.3.0 - November 01, 2022
.NET Framework 4.8
I'm trying to figure out how to retrieve the FileProperties (JSON values) that contains metadata information regarding files uploaded ...
0
votes
1
answer
87
views
XM Cloud External Editing Host Configuration
Problem Statement
I'm attempting to configure an external editing host using Sitecore's documentation for XM Cloud.
My editing host is in Vercel.
Headless SXA seems to have moved JSS App configuration ...
0
votes
1
answer
113
views
Setting up 500 error page in XM Cloud Sitecore instance with static html pages
I am trying to have setup 500 error page in XM Cloud Sitecore instance.
I have configured "Server error page link" in setting item but do not see "Error Handling" tab to generate ...
1
vote
0
answers
33
views
Headless SXA - Ensuring links are localized
We're developing a Language Switcher for our SXA NextJS app, I followed the documentation from NextJS on how to perform the switch and it works (switching from language A to language B) but what I ...
2
votes
1
answer
180
views
Issue on Submit Action for Sitecore Forms in NextJS app
I'm trying to implement Sitecore Forms with the NextJS app using this official document https://doc.sitecore.com/xp/en/developers/hd/211/sitecore-headless-development/implement-a-sitecore-form-in-a-...
2
votes
1
answer
460
views
A rendering error occurred: Cannot read properties of undefined (reading 'attributes')
I have Setup the JSS application with Sitecore 10.3. When I am adding the components on page level its working fine but when I added them on partial design they are appearing fine there in experience ...
2
votes
2
answers
252
views
ClientError: GraphQL.ExecutionError: Error trying to resolve rendered
Error while jss start:connected in sitecore jss next js sample app
0
votes
1
answer
140
views
Sitecore JSS nextjs | The requested document was not found [closed]
Sitecore jss nextjs sample app in connected mode.
installation is done as per https://doc.sitecore.com/xp/en/developers/hd/200/sitecore-headless-development/walkthrough--creating-a-jss-next-js-...
2
votes
1
answer
89
views
Prevent Sitecore from creating the sitename#lang cookie in jss/nextjs app
Is there a way to block Sitecore from creating the {website}#lang cookie? When Sitecore's Layout Service is used with a headless app (a next js app)?
Will it be enough to add a processor in ...
0
votes
1
answer
190
views
Error: GraphQL Error (Code: 401): {"response":{"error":"Unauthorized","status":401 [closed]
I was installing sitecore jss wioth next js and added language en-US.
for deploying app, I ran - jss deploy items --language=en-US --includeContent --includeDictionary
any ideas to fix it?
1
vote
1
answer
100
views
Headless/JSS 20 NextJS Prefetch mode
We're building a NextJS app using JSS 20.
Next's prefetching behavior differs from local development:
On production environments any links on a page are prefetched (for performance reasons), on local ...
1
vote
0
answers
92
views
JSS Sitecore Form Button Submission Failed With Anti-Forgery Cookie Issue
JSS NextJS Form Component
import { Form } from '@sitecore-jss/sitecore-jss-react-forms';
import React from 'react';
import { NextRouter, withRouter } from 'next/router';
import { sitecoreApiKey } from ...
2
votes
1
answer
768
views
Headless/SXA/Next.JS : Server error : TypeError: Cannot read properties of undefined (reading 'CustomVariant')
We are using Sitecore-10.3/Headless/SXA/NextJS. When we build a custom new component with few custom variants, we receive errors. We will not receive this when we use the "Default variant".
...
1
vote
1
answer
165
views
Deploy NextJS Headless SXA app into XM1 Container Instance
I am trying to deploy the NextJS Headless SXA app into the Sitecore XM1+ Headless SXA Docker container.
For this, i have setup the instance for Sitecore XM1 with following details:
SITECORE_VERSION=...
2
votes
1
answer
7k
views
Error : TypeError: Class extends value undefined is not a constructor or null
To create a Sitecore JSS app, I ran the PowerShell command below :
npx create-sitecore-jss --templates nextjs,nextjs-sxa --appName foodorder --hostName sc103.sc --fetchWith GraphQL
However, I ...
0
votes
0
answers
201
views
Sitecore Next.js - Connection to your rendering host failed
I'm trying to connect Sitecore CM (XM, local VM) with Next.js app (on Azure static web app).
On sitecore side, i'm using SXA with this setting configuration:
Browsing my web app static with simple ...
0
votes
1
answer
379
views
ERROR [JSS] Error occurred during POST to remote rendering host: `http://localhost:3000/api/editing/render`
We are running Next.js JSS app using XM Cloud docker setup, our localhost:3000 site is loading, but when we are trying to run Experience Editor it is giving 2 erros.
On First Try we are getting below ...
1
vote
1
answer
316
views
Next.js, Pages Still Generated When Components Error
We have a Next.js implementation on Vercel connected to Experience Edge. We noticed that when components error out, the page that contains the component is still generated. This results in public-...
0
votes
2
answers
4k
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,
...
0
votes
1
answer
273
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
37
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
143
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
119
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 ...
1
vote
1
answer
138
views
How do you create Components with children like Tabs, Carousels, Search Results or List of Cards?
I am just transitioning from Sitecore MVC to SitecoreNextJs. I have been able to create simple components fairly easily, but haven't been able to create components with children, like tabs, carousels, ...
0
votes
1
answer
364
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
440
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 ...
3
votes
2
answers
682
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
425
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 [[.....
2
votes
0
answers
214
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 ...
0
votes
0
answers
24
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--...