0

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 from the Site Grouping items back into the xml configs. Once I publish the app configuration to my local XM Cloud, I get this error whenever I select an item under the site node:

Local Demo Site The site configuration looks like this:

<site name="Demo"
      inherits="website"
      hostName="$(env:host)"
      rootPath="/sitecore/content/merkle/demo"
      patch:before="site[@name='website']" />

The app configuration looks like this:

<javaScriptServices>
  <apps>
    <app name="Demo"
          sitecorePath="/sitecore/content/merkle/demo"
          graphQLEndpoint="/sitecore/api/graph/edge"
          serverSideRenderingEngine="http"
          serverSideRenderingEngineEndpointUrl="https://my-editing-host.vercel.app/api/editing/render"
          serverSideRenderingEngineApplicationUrl="https://my-editing-host.vercel.app/"
          useLanguageSpecificLayout="true"
          defaultWorkflow=""
          protectDeveloperItems="false"
          deploymentSecret="SUPERSECRETCODE!"
          debugSecurity="false"
          inherits="defaults" />
  </apps>    
</javaScriptServices>

The CM logs show this exception:

Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: path
Source: Sitecore.Kernel
   at Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName)
   at Sitecore.Data.DefaultDatabase.GetItem(String path)
   at Sitecore.XA.JSS.Foundation.Multisite.Pipelines.GetAppConfiguration.GetConfigurationFromItems.GetRenderingHostDefinition(SiteInfo siteInfo, Database database)
   at Sitecore.XA.JSS.Foundation.Multisite.Pipelines.GetAppConfiguration.GetConfigurationFromItems.Process(GetConfigurationArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.JavaScriptServices.Configuration.ConfigFactoryConfigurationReader.GetAll()
   at Sitecore.JavaScriptServices.Configuration.ConfigFactoryConfigurationReader.GetByAttribute(String attributeName, String attributeValue)
   at Sitecore.JavaScriptServices.Configuration.ConfigurationResolver.ResolveForItem(Item item)
   at Sitecore.JavaScriptServices.ViewEngine.Pipelines.HttpRequest.HeadlessSiteAccess.Process(HttpRequestArgs args)
   at (Object , Object )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Web.RequestEventsHandler.OnPostAuthenticateRequest(HttpContextBase context)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Troubleshooting

  • ⛔ I've attempted to add a renderingHosts item to the xmcloud.build.json file that matches the App name: Demo.
  • ⛔ Commented-out the JSS App configuration for Demo
  • 🙈 Commenting-out the Site configuration allowed me to select items under Demo

I'm following the steps provided by Sitecore, but there must be something I'm missing.

1
  • 1
    In XM Cloud with Headless SXA, the configuration is all item based, not config file based. In fact, if you add the config patch files and deploy them you will likely break some things.
    – Richard Seal
    Commented Jun 5, 2023 at 19:57

1 Answer 1

0

The error in fact tells that there is no Site Grouping defined for the Site. You should remove the custom configs and define them under the Settings/Site Grouping like we used to in SXA. This should work!

Your Answer

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

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