Expand my Community achievements bar.

SOLVED

Override com.day.cq.wcm.msm.impl.actions.ContentUpdateActionFactory

Avatar

Level 6

Hello Team,

 

We need to allow jcr:title property for live copy creation. In order to do so, we are thinking to add this configuration at code level.

 

I tried to do in below ways:

 

1)  Create a file under /apps/myproject/osgiconfig/config/com.day.cq.wcm.msm.impl.actions.ContentUpdateActionFactory.amended-custom.xml

 

Content:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
cq.wcm.msm.action.excludednodetypes="[cq:LiveSyncConfig,cq:BlueprintSyncConfig,cq:LiveSyncAction]"
cq.wcm.msm.action.excludedparagraphitems="[cq:propertyInheritenceCancelled]"
cq.wcm.msm.action.excludedprops="[jcr:(?!(title)$).*,sling:.*,(?!cq:tags)+cq:.*,hashValue]"
cq.wcm.msm.action.ignoredMixin="[.*]"/>

 

2) Create a file under /apps/myproject/config/com.day.cq.wcm.msm.impl.actions.ContentUpdateActionFactory.amended-custom.xml

 

and file content is same as of Step 1.

 

NOW,

 

When I check in config manager,

 

It shows me 2 different configuration with same name and still not able to sync jcr:title in live copy pages.

arvind_0-1628526473485.png

 

What Am I missing here?

 

Thanks in advance.

 

Regards,

AP

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @arvind 

 

Please create a config with name com.day.cq.wcm.msm.impl.actions.ContentUpdateActionFactory.xml at the same location where you have all other OSGi configs defined.

 

Add the below content in it: Here I am trying to update both title and description property.

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
cq.wcm.msm.action.excludednodetypes="[cq:LiveSyncConfig,cq:BlueprintSyncConfig,cq:LiveSyncAction,cq:CatalogSyncConfig,cq:CatalogSyncAction,cq:meta]"
cq.wcm.msm.action.excludedparagraphitems="[cq:propertyInheritanceCancelled,dc:title]"
cq.wcm.msm.action.excludedprops="[jcr:(?!(title|description)$).*,sling:(?!(resourceType|resourceSuperType|alias)$).*,cq:(?!(designPath|template|lastTranslationUpdate|targetEngine|redirectTarget)$).*,publishCampaignId]"
cq.wcm.msm.action.ignoredMixin="[.*]"/>

 Create another config with com.day.cq.wcm.msm.impl.actions.ReferencesUpdateActionFactory.xml name

add the below property in it:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
cq.wcm.msm.action.excludednodetypes="[cq:LiveSyncConfig,cq:BlueprintSyncConfig,cq:LiveSyncAction,cq:meta]"
cq.wcm.msm.action.excludedparagraphitems="[cq:propertyInheritanceCancelled]"
cq.wcm.msm.action.excludedprops="[jcr:.*,sling:.*,cq:(?!(redirectTarget)$).*]"/>

This should help resolve your issue. Remove all other configs which are not required.

Thanks! 

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @arvind 

 

Please create a config with name com.day.cq.wcm.msm.impl.actions.ContentUpdateActionFactory.xml at the same location where you have all other OSGi configs defined.

 

Add the below content in it: Here I am trying to update both title and description property.

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
cq.wcm.msm.action.excludednodetypes="[cq:LiveSyncConfig,cq:BlueprintSyncConfig,cq:LiveSyncAction,cq:CatalogSyncConfig,cq:CatalogSyncAction,cq:meta]"
cq.wcm.msm.action.excludedparagraphitems="[cq:propertyInheritanceCancelled,dc:title]"
cq.wcm.msm.action.excludedprops="[jcr:(?!(title|description)$).*,sling:(?!(resourceType|resourceSuperType|alias)$).*,cq:(?!(designPath|template|lastTranslationUpdate|targetEngine|redirectTarget)$).*,publishCampaignId]"
cq.wcm.msm.action.ignoredMixin="[.*]"/>

 Create another config with com.day.cq.wcm.msm.impl.actions.ReferencesUpdateActionFactory.xml name

add the below property in it:

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
cq.wcm.msm.action.excludednodetypes="[cq:LiveSyncConfig,cq:BlueprintSyncConfig,cq:LiveSyncAction,cq:meta]"
cq.wcm.msm.action.excludedparagraphitems="[cq:propertyInheritanceCancelled]"
cq.wcm.msm.action.excludedprops="[jcr:.*,sling:.*,cq:(?!(redirectTarget)$).*]"/>

This should help resolve your issue. Remove all other configs which are not required.

Thanks! 

Avatar

Level 6
@ asutosh_jena , Thanks for your reply. Issue was location of file. It must be only /apps/projectname/config/....... AEM version:6.5.6.0

Avatar

Employee Advisor

Hi @arvind ,

 

You can go through below url

 

https://bimmisoi.blogspot.com/2020/08/page-properties-not-getting-inherited.html

 

And in order to commit the same 

 

com.day.cq.wcm.msm.impl.actions.ContentUpdateActionFactory.xml

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:OsgiConfig"
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|description|language)$).*,sling:(?!(resourceType|resourceSuperType)$).*,cq:(?!(designPath|template|lastTranslationUpdate|targetEngine|tags|allowedTemplates|redirectTarget)$).*,publishCampaignId]"/>

 

 

Hope this helps!!!

 

Thanks