0

we are adding a JSS rendering component in SXA site. We have added the below query in JSS component data source location.

query:$site/*[@@name='Data']/*[@@templatename='Content Blocks Folder']

It is working if we add direct path in datasource location.

we want to refer the data from the Data folder of the Site.


Error Rendering Sitecore.JavaScriptServices.ViewEngine.Presentation.JsLayoutRenderer: Cannot read property 'title' of undefined
TypeError: Cannot read property 'title' of undefined

at Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.Http.HttpNodeInstance.InvokeExport[T](NodeInvocationInfo invocationInfo)
at Sitecore.JavaScriptServices.ViewEngine.NodeServices.HostingModels.OutOfProcessNodeInstance.InvokeExport[T](String moduleName, String exportNameOrNull, Object[] args)
at Sitecore.JavaScriptServices.ViewEngine.NodeServices.DefaultNodeServices.InvokeExportWithPossibleRetry[T](String moduleName, String exportedFunctionName, Object[] args, Boolean allowRetry)
at Sitecore.JavaScriptServices.ViewEngine.NodeServices.DefaultNodeServices.InvokeExport[T](String moduleName, String exportedFunctionName, Object[] args)
at Sitecore.JavaScriptServices.ViewEngine.Node.NodeRenderEngine.Invoke[T](String moduleName, String functionName, Object[] functionArgs)
at Sitecore.JavaScriptServices.ViewEngine.Presentation.JssRenderer.PerformRender(TextWriter writer, IRenderEngine renderEngine, String moduleName, String functionName, Object[] functionArgs)
at Sitecore.JavaScriptServices.ViewEngine.Presentation.JssRenderer.Render(TextWriter writer)
at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)
1
  • 1
    I am not familiar with code but I think that SXA specific queries might not be resolved before value from the field is used by JSS. You can either do it by yourself if you will find a good place (use ITokenResolver service or run through resolveTokens pipeline), wait till someone will help you with that (if any1 had the same case and solved it) or report it to support. and ask for a hotfix. Feb 6, 2019 at 9:11

1 Answer 1

1

Currently, JSS can coexist with SXA on the same Sitecore instance, as a separate site. JSS is not currently capable of acting as an SXA tenant or using SXA's experience editor extensions (i.e. drag and drop components, variants, partials, etc), or any of SXA's features.

https://jss.sitecore.com/help#can-i-use-jss-with-sxa

1
  • will it won't work for SXA tokens as well?
    – Hussain
    Feb 6, 2019 at 13:44

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.