In my previous post about AEM LiveCopy, I showed how this powerful tool could be used to manage multiple variant-based sites such as dealer or branch sites. Recently, I found another trick which can help make LiveCopy even more powerful and easy to use.
Why Isn’t My Title Updating??
By default, AEM excludes certain properties from the live copy update and initial rollout. During a recent implementation, I encountered an issue where the client wanted to be able to roll out jcr:title updates from one master language copy to the regional websites. Unfortunately, by default, AEM excludes all jcr: properties, including jcr:title from LiveCopy updates.
Luckily, an OSGi configuration controls which properties are to be excluded, which allows you to easily update this setting on your AEM instance.
Updating jcr:title with AEM LiveCopy
Inspired Digital Experiences for Manufacturing & Automotive
Whether you’re just beginning your digital transformation journey or are well on your way, we invite you to explore our partnership with Adobe and our diverse capabilities in manufacturing and automotive.
The solution to this problem was to create an OSGi configuration with the name com.day.cq.wcm.msm.impl.actions.ContentUpdateActionFactory.config in our application’s configuration folder. This configuration is based on the default configuration, but instructs AEM to NOT ignore the jcr:title and cq:tags properties by added them into a regular expression used by AEM to determine which properties should be excluded in the cq.wcm.msm.action.excludedprops property:
# Custom configuration to enable the live copying of jcr:title and cq:tags cq.wcm.msm.action.excludednodetypes=["cq:LiveSyncConfig","cq:BlueprintSyncConfig","cq:LiveSyncAction","cq:CatalogSyncConfig","cq:CatalogSyncAction","cq:meta"] cq.wcm.msm.action.excludedparagraphitems=["cq:propertyInheritanceCancelled"] cq.wcm.msm.action.ignoredMixin=[".*"] cq.wcm.msm.action.excludedprops=["jcr:(?!(title)$).*","sling:(?!(resourceType|resourceSuperType)$).*","cq:(?!(designPath|template|lastTranslationUpdate|targetEngine|tags)$).*","publishCampaignId"]
The cq.wcm.msm.action.excludedprops property is a list of regular expressions, with each being checked against the property name to determine whether or not the property should be updated. In this case, the regular expression jcr:(?!(title)$).* uses lookbacks to exclude every jcr: property besides jcr:title.
Excluding Custom Properties
If you need to exclude custom properties from LiveCopy updates, you can also use this same feature. By setting a regular expression which excludes your property in cq.wcm.msm.action.excludedprops, allows you to easily exclude a custom property in LiveCopy rollout updates.
Hopefully, this gives you some insight into the internal workings of AEM LiveCopy. Please leave a comment below if you have any questions or need any help with AEM LiveCopy!
Hey Dan, We are overwriting same OSGI configuration but it does not work when you roll out whole site, it does work when you roll out individual pages. We have added exclusion rule for jcr:title & jcr:description in in regular expression. here is what i have in place jcr:(?!(?:title|description)$).+
Any idea what else is missing ?
I would check if there’s another com.day.cq.wcm.msm.impl.actions.[ACTION].config that may be used on site rollouts rather than the com.day.cq.wcm.msm.impl.actions.ContentUpdateActionFactory.config.