I installed Sitecore JavaScript Services Server for Sitecore 9.3 XP 13.0.0 rev. 190924
in a 9.3 instance.
I then created an item under the Home item using the /sitecore/templates/Sample/Sample Item
template that comes with Sitecore OOTB.
Then, I attempted to request the URL https://jss2sc.dev.local/sitecore/api/layout/render/jss?item=/sitecore/content/Home/Sample-Item-1&sc_apikey={CD923013-41B7-46C6-B0A9-D726FB003BA7}
in the browser and it worked.
I got a response with Status 200 with the following JSON:
{"sitecore":{"context":{"visitorIdentificationTimestamp":637263825029421689,"pageEditing":false,"site":{"name":"website"},"pageState":"normal","language":"en"},"route":{"name":"Sample Item 1","displayName":"Sample Item 1","fields":{"Text":{"value":"<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum euismod placerat tortor, quis faucibus sem mollis mattis. Proin quis blandit erat, eget eleifend mi.</p>"},"Title":{"value":"Sample Item 1"}},"databaseName":"web","deviceId":"fe5d7fdf-89c0-4d99-9aa3-b5fbd009c9f3","itemId":"6e5918f1-74d4-488e-a1e3-37fb73b2a1ec","itemLanguage":"en","itemVersion":1,"layoutId":"14030e9f-ce92-49c6-ad87-7d49b50e42ea","templateId":"76036f5e-cbce-46d1-af0a-4143f9b557aa","templateName":"Sample Item","placeholders":{}}}}
I then created an item using a template I defined and attempted to request that item using the same URL above (but changing the value of the item
query string parameter) and got a status 404.
I went back to the Sample Item 1
I had created first that worked and removed all Presentation Details
from it and did a full site publish. When I requested it again using the first URL above, I still get a 200 response and I still get the same JSON.
I haven't done any JSS development nor ran jss setup
nor ran jss deploy
into this 9.3 instance.
So my questions are:
- Why is JSS rendering items of template
/sitecore/templates/Sample/Sample Item
but not of any other template? - Is there anything I can do to configure JSS to also render templates I create?