2

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 editor as shown below but when select that partial design on page design and assign that page design on page then it is giving error "A rendering error occurred: Cannot read properties of undefined (reading 'attributes')".

Partial Design in Experience Editor

Page Item In Experience Editor having page design selected

Below is the screenshot of layout service, it seems like datasource is not binding properly.

Layout Service

Any ideas to fix this?

4
  • Can you share the code in the component?
    – Richard Seal
    May 2 at 13:03
  • I am using the OOTB JSS components only for now like Image and Rich Text. May 2 at 13:06
  • I am also facing the same issue. Was anyone able to fix it? I have set sxa-jss configuration set everywhere possible. May 17 at 13:00
  • @Pedro Almeida Did you check the below answer?
    – Gautam
    May 18 at 13:11

1 Answer 1

1

I was also facing some issues in headless SXA with Sitecore 10.3 while using partial designs but my errors were different. Nonetheless Can you please check 2 things?

  1. Value of Layout service configuration field in site settings sitecore item, path should be : /sitecore/content/[Your Tenant Name]/[Your site name]/Settings, it should be sxa-jss not jss.

  2. Check the [your front end app name].config file (in my case it was jss-nextjs-app) inside your sitecore local instance path under \App_Config\Include\zzz, check for the node Jss App Registration, Here the value of layoutServiceConfiguration attribute should be sxa-jss.

One more thing - The layout service you are using in screenshot should also be sxa-jss not jss meaning the URL /sitecore/api/layout/render/sxa-jss?item...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.