Not able to unlock template layout container (both root and any custom templates) after publish via sling job. | Community
Skip to main content
Level 2
December 12, 2023

Not able to unlock template layout container (both root and any custom templates) after publish via sling job.

  • December 12, 2023
  • 2 replies
  • 2157 views

I need to publish templates and template types along with other nodes. I achieve this with a sling job, however, unlock doesn't work on the template root and also on any custom templates created on top of the published template-types.

I notice that, if I pass replicationOptions.setSuppressStatusUpdate(true) it works. But this would not update properties like 'isActivated', 'cq:lastReplicated' and 'cq:lastReplicatedBy' which is a limitation for me.

 

Version: AEM 6.5.15

Please help me resolve this issue.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

aanchal-sikka
Community Advisor
Community Advisor
December 12, 2023

Hello @samaraneni 

 

We need not publish template-types, only templates are required.

All pages are rendered via templates.

 

Template-types are only a template to create new templates. You can skip publishing the same.

 

Please try and validate on publish that all features work fine without template-types

Aanchal Sikka
Level 2
December 12, 2023

Thanks for the response.

I agree excluding 'template-types' from publishing would let me unlock, however I have this concern with not publishing 'template-types'

1) They won't exist in publish instance anymore but there is a reference to template-types as shown in this image

Are there any potential issues that could arise if these elements are not included? In the package approach, these elements are present in the published instance. I want to ensure that transitioning to the API approach won’t inadvertently cause any issues.

 

Level 2
December 17, 2023

@samaraneni 

 

Please do not replicate nodes individually. Publish only the template.

 

I have published the template and root. Still able to unlock

 

One difference is I am using AEM Cloud SDK.

 


Now I have tried with the parent nodes published at these levels

/conf/wknd/settings/wcm

/conf/wknd/settings/wcm/templates

/conf/wknd/settings/wcm/templates/adventure-page-template/structure

/conf/wknd/settings/wcm/templates/adventure-page-template/structure/jcr:content

/conf/wknd/settings/wcm/templates/adventure-page-template/structure/jcr:content/root

Still I see the same issue with unlocking http://localhost:4502/bin/wcm/template/sync.html/conf/wknd/settings/wcm/templates/adventure-page-template/structure/jcr:content/root

Could you please try reproducing the issue on AEM 6.5.15. Thanks

kautuk_sahni
Community Manager
Community Manager
January 2, 2024

@samaraneni Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni