Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Editable template with structured content

Avatar

Level 2

I have created an editable page template under Tools > General > Templates.

 

On this template within the Layout Container [Root] I have added a component in Structure mode which I have populated with content. The idea is that this component populated with content will show on all pages that implement this template.

 

However, whilst this displays correctly in author, on publish the component does not show on the page. I have worked out that this is because the anonymous user does not have read permissions to the /conf/.../templates folder.

 

Am I using editable templates in the wrong way, or do I really need to give read permissions to the /conf/.../templates in publish (I am very reluctant to do so)?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

/conf/ access is not required at publisher, it is access internally by script user/service.

Have you deployed/publish the content and code in publisher after changes.

Can you try with Core component project or WKND project

https://docs.adobe.com/content/help/en/experience-manager-learn/getting-started-wknd-tutorial-develo...



Arun Patidar

View solution in original post

8 Replies

Avatar

Correct answer by
Community Advisor

Hi,

/conf/ access is not required at publisher, it is access internally by script user/service.

Have you deployed/publish the content and code in publisher after changes.

Can you try with Core component project or WKND project

https://docs.adobe.com/content/help/en/experience-manager-learn/getting-started-wknd-tutorial-develo...



Arun Patidar

Avatar

Level 2
Thanks Arun for you quick reply. I have just tested using WKND and it worked... When I investigated the difference between my own project and the WKND project, I found this rep:policy node in the Github project https://github.com/adobe/aem-guides-wknd/blob/master/ui.content/src/main/content/jcr_root/conf/wknd/.... Do you agree that READ access to the /conf/../templates folder is required on publish?

Avatar

Community Advisor
not needed because only authors and everyone have access to /conf/ but not anonymous user, try to add same permission in author and then publish template.


Arun Patidar

Avatar

Level 2
Arun - I removed these permissions from PUBLISH server and the component I added to the template in Structure mode no longer shows on the page when I access it on PUBLISH. I am specifically interested in permissions on PUBLISH - permission on AUTHOR are fine.

Avatar

Level 2
These I the steps I followed (maybe you can confirm by doing the same?) 1) Download/clone https://github.com/adobe/aem-guides-wknd.git 2) Deploy code to AUTHOR and PUBLISH by running mvn clean install -PautoInstallPackage,autoInstallPackagePublish,adobe-public 3) Update Content Page Template, add Text component to the Layout Container, populate Text component with content. 4) Publish Content Page Template 5) On PUBLISH, remove everyone READ permissions from /conf/wknd/settings/wcm/templates (You have said these permissions aren't required) 6) Open page in an Incognito window - http://localhost:4503/content/wknd/us/en/about-us.html (Text component added to template doesn't show)

Avatar

Level 2

Arun - just to clarify, my understanding is the anonymous user is part of the everyone group. So when I say I don't want to give the anonymous user permissions to my project's /conf/.../templates folder on PUBLISH, this also means I want to avoid giving the everyone group permissions to this folder on PUBLISH - as the result is the same.

Avatar

Community Advisor

Hi,

In PUBLISH everyone group should have read permission to read template section inside /conf/.

anonymous user is member of everyone group, so no need to add explicit read permission for anonymous user.

 

I would say, check below permission in PUBLISH :

1.  anonymous user is added in everyone group

2. everyone group has read permission at /conf/...../myproject

 

It is fine to give /conf/ permission but direct access of /conf/ should be blocked from dispatcher.



Arun Patidar