Repository Initialization: Unable to set properties its already existed property | Community
Skip to main content
venkateshk87129
Level 2
October 21, 2022

Repository Initialization: Unable to set properties its already existed property

  • October 21, 2022
  • 1 reply
  • 1113 views

I am unable to set properties which already existed property using repository initialization script

property cq:allowedTemplates already existed with type "String" but I am trying to set same property with multiple values with type "String[]" causing stopping server error: 

org.apache.sling.engine.impl.SlingHttpContext handleSecurity: Possible reason is missing Repository service. Check AuthenticationSupport dependencies.

can you delete/remvoe property using repository initialization script

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

1 reply

Saravanan_Dharmaraj
Community Advisor
Community Advisor
October 21, 2022

"RepoInit operations are always additive, except for a few cases which allow removal of Users, Service Users, and Groups.

Explicit permissions are not needed to run the RepoInit scripts. They have implicit permissions to perform all actions defined per the scripts."

 

https://www.bounteous.com/insights/2021/11/16/adobe-experience-managers-sling-repoinit-have-you-tried-it-yet - Please check this blog

https://sling.apache.org/documentation/bundles/repository-initialization.html - this one for reference

venkateshk87129
Level 2
October 21, 2022

Hi Sravan,

I have referred above blogs but I don't find solution to  delete property on specified path through repository script

Saravanan_Dharmaraj
Community Advisor
Community Advisor
October 21, 2022

It works on append mode only, deletion is only for Users, Service Users, and Groups.