1

We're on Sitecore 9.2, SXA 1.9, JSS 12.

previously

On 9.1, we had the following setup:

  • JSS App sitting in /sitecore/content/myapp
  • A site definition that mapped a hostName to our /myapp
  • A JSS application with an SSR proxy, deployed to a Linux server

And it worked.

but now

  • We have a JSS Tenant, an in it a JSS Site set up - being managed like a traditional SXA site (the SXA Multi Site Resolver)
  • Therefore we have no site definition config file (it is directly recommended we do not use one in the docs)
  • A JSS application with an SSR proxy deployed to a Linux server

And the problem is this. Once the proxy redirects incoming requests to the CD server's /sitecore/api/layoutservice?someparams&sc_site=myapp (the appending of the site name was a necessary adjustment of the SSR standard code) we get hit by an exception. Basically the LayoutService is telling me, it has no idea what the site myapp is.

System.InvalidOperationExceptionMessage: Site from query string was not found: myappSource: Sitecore.Kernelat Sitecore.Pipelines.PreAuthenticateRequest.SiteResolver.ResolveSiteContext(HttpRequestArgs args)at Sitecore.Pipelines.PreAuthenticateRequest.SiteResolver.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.OnBeginRequest(HttpContextBase context)at Sitecore.Nexus.Web.HttpModule.

So that raises a number of questions. In the stack trace we see that it is not the XA.MultiSiteResolver trying to find out site, it's Sitecore vanilla. Are we meant to reconfigure this, or how else would we go about getting site resolution to work?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.