Policies and experience fragments ask for republish after every deployment | Adobe Higher Education
Skip to main content
Level 3
January 25, 2024
해결됨

Policies and experience fragments ask for republish after every deployment

  • January 25, 2024
  • 5 답변들
  • 825 조회

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.

 

이 주제는 답변이 닫혔습니다.
최고의 답변: kaikubad

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

5 답변

Raja_Reddy
Community Advisor
Community Advisor
January 25, 2024

Hi @kam-nyc 

  1. Verify that the policies and experience fragments are being properly saved and published during the deployment process.
  2. Check if there are any caching issues that might be causing the popup to show up even though the policies and experience fragments have already been published.
  3. If the issue persists, you can try clearing the cache and restarting the server to see if that resolves the issue.
Sudheer_Sundalam
Community Advisor
Community Advisor
January 25, 2024

@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.

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 25, 2024

 

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.

 

Esteban Bustamante
kaikubad
Community Advisor
kaikubadCommunity Advisor답변
Community Advisor
January 26, 2024

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
kautuk_sahni
Community Manager
Community Manager
January 30, 2024

@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.

Kautuk Sahni