Hello communities,
After every deployment to dev/stage/production, when we try to publish a page the popup (screenshot below) always shows up and ask for republish those policies and experience fragments, even though we didn't make any updates to any policies or experience fragments. Any idea? Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
The reason is you are overriding the existing policies on each deployment. Add the following lines on the policy of your exp fragment. Your issue will be solved
<jcr:content
cq:lastReplicated="{Date}2020-01-01T00:00:00.000+01:00"
cq:lastReplicatedBy="Deployment"
cq:lastReplicationAction="Activate"
cr:primaryType="nt:unstructured"/>
Another way is set the mode to merge on filter so that its not replaced on each deployment.
<filter root="/conf/hbkworld/settings/wcm" mode="merge">
<include pattern="/conf/{your_app_name}/settings/wcm/policies"/>
</filter
Hi @Kam-nyc
@Kam-nyc ,
Check the filter paths in ui.config and ui.content maven modules. It seems you are replacing the content in these mutable paths of policies and experience-fragments by the content saved in the code.
Agreed with @Sudheer_Sundalam, it seems like you are redeploying that content with each deployment. Please check if you have versioned properties with dates, such as cq:lastModified and cq:lastActivation; usually, this should be avoided.
The reason is you are overriding the existing policies on each deployment. Add the following lines on the policy of your exp fragment. Your issue will be solved
<jcr:content
cq:lastReplicated="{Date}2020-01-01T00:00:00.000+01:00"
cq:lastReplicatedBy="Deployment"
cq:lastReplicationAction="Activate"
cr:primaryType="nt:unstructured"/>
Another way is set the mode to merge on filter so that its not replaced on each deployment.
<filter root="/conf/hbkworld/settings/wcm" mode="merge">
<include pattern="/conf/{your_app_name}/settings/wcm/policies"/>
</filter
@Kam-nyc 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.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies