Sitecore / jss

Software development kit for JavaScript developers building web applications with Sitecore Experience Platform
https://jss.sitecore.com
Apache License 2.0
261 stars 273 forks source link

xGraph Browser Requires Rendering to Be Under Folder with Site Name #64

Closed coreyasmith closed 6 years ago

coreyasmith commented 6 years ago

I've got my renderings importing into a Helix folder structure: /sitecore/layout/Renderings/Project/Website. In my site definition, my site is called my-site. When I try to open the GraphQL browser on renderings under the Website folder, I get the following error:

The JSS application Website was not registered with Sitecore.

It appears that the xGraph Browser is using the name of the rendering's parent folder to determine whether or not the rendering belongs to a site register with Sitecore. If I create a folder /sitecore/layout/Renderings/Project/my-site, and move the rendering under that folder, the xGraph Browser opens fine.

kamsar commented 6 years ago

That's correct. Because there is no linkage between a rendering and any site - and in order to open xGraph Browser we need to know what endpoint to open it on (which is resolved via JSS site config), we have to make an educated guess as to which JSS site the rendering belongs to.

y u no make your names consistent? ;)

kamsar commented 6 years ago

As with #65 in GM there are methods you can override on the GraphQL field type that will enable you to customize this with your specific logic requirements if you insist on being inconsistent :trollface:

marcelgruber commented 1 year ago

For the sake of search engine visibility, another variation of the message I saw is:

The JSS application Insights was not registered with Sitecore.