When I create a new HTL template (page)/component or edit an existing one, it does not compile/render. The page just gets stuck perpetually loading. Switching to "Development Mode" in "Apache Sling Scripting Sightly Engine Configuration" worked to render it once, but not again.
Does anyone know why this would be occurring?
Views
Replies
Total Likes
Any error in error.log or browser console?
~kautuk
Views
Replies
Total Likes
I can't see anything in the error.log and there is nothing in console.
I came in this morning and both test templates compiled. I made a change to one which it compiled again, and then I made another change to it and it stopped compiling.
Views
Replies
Total Likes
Geoffrey McIntyre wrote...
I can't see anything in the error.log and there is nothing in console.
I came in this morning and both test templates compiled. I made a change to one which it compiled again, and then I made another change to it and it stopped compiling.
can you try restarting Apache Sling Scripting Sightly Engine (org.apache.sling.scripting.sightly) bundle.?
~ VAr
Views
Replies
Total Likes
Awesome, making progress. So now this allows one of my template components in the directory (/apps/site/components/page/) to continually be updated with no issues. My other template in (/apps/site/components/page/2017/) though won't compile and when I do try to update and compile it, it also causes the other template to stop compiling.
Upon further investigation it is definitely being caused by having the template component in a sub-directory of page.
Views
Replies
Total Likes
Would be great if can make a sample of this.
Views
Replies
Total Likes
It is really basic, two templates in the template directory (/apps/site/templates), two components in the component page directory (/apps/site/components/page) but one is in a sub-directory. (/apps/site/components/page/2017). The components have resourceSuperType: wcm/foundation/components/page and the templates are pointing to their corresponding component.
Both template components are basic HTL:
<html>
<head>
<div data-sly-include="/libs/wcm/core/components/init/init.jsp"></div>
</head>
<body>
<h1>Simple Page Component Using Sightly 20</h1>
<h1>You can add components below</h1>
<div data-sly-resource="${ @path='par', resourceType='foundation/components/parsys'}"></div>
</body>
</html>
I can reproduce this in a fresh copy of AEM 6.2 SP1 as well.
Views
Replies
Total Likes
I would not use the <div> in the head, because it will generate invalid HTML.
See this : /libs/wcm/foundation/components/page/page.html
this will have all the logic: <head data-sly-include="head.html"></head>
Views
Replies
Total Likes
I completely agree that it shouldn't be a div in the head. This was just the last template from example sites I tried before figuring out the fact that it is having issues with the template component being in a sub-directory. Both templates are the same except for the directory their component is in, but only one of them works. I made the suggested change and it is the same result.
Views
Replies
Total Likes
I just copied the second template component which doesn't work into the same directory as the one that does work. I then copied the template of the one that doesn't work to the same directory as the rest and pointed it at the new copy of the template component and it works fine.
It is definitely something to do with having a page component in (/apps/site/components/page) vs (/apps/site/components/page/2017).
Views
Replies
Total Likes
This was not solved, creating a sub-directory "2017" in the component sub-directory "page" (/apps/site/components/page/2017) still causes the compiler to crash.
I simply worked around this issue by creating a new single level component sub-directory for my components "page2017" (/apps/site/components/page2017).
Views
Replies
Total Likes
Are you using AEM6.1 or AEM6.2?
Can share you a code-package where we can see the issue?
Views
Replies
Total Likes
I am using AEM 6.2. I will make a package as soon as I get a chance, but I assume that means you cannot reproduce it simply by having the template component two sub-directories deep in the components directory, as described above?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies