AEM as a Cloud Service: Prevent repeated republishing of afpolicy and default nodes

This article explains how to resolve the issue where afpolicy and default nodes are republished each time a form page is published in Adobe Experience Manager as a Cloud Service, even when no changes have been made to the form or template.

Description description

When publishing a page containing an Adaptive Form in Adobe Experience Manager as a Cloud Service, afpolicy and default nodes are republished every time, regardless of whether changes were made. This behavior is seen in the repository and deployment logs and leads to unnecessary deployments of these nodes.

Environment

Adobe Experience Manager as a Cloud Service (AEMaaCS)

Symptoms

  • The afpolicy and default nodes are republished each time a form page is published.
  • No explicit error messages are shown.
  • The behavior occurs even if the form or template hasn’t changed.

Cause

This issue occurs when the template associated with the form page is missing the lastmodified property. Without this property, AEM treats the template as changed on every publish, resulting in repeated republishing of the afpolicy and default nodes.

Resolution resolution

Follow the steps below to resolve the issue:

  1. Update the template associated with the affected form page to include the lastmodified property. In AEM as a Cloud Service, repository changes must be made through your codebase and deployed via the Cloud Manager pipeline.
  2. In your project codebase, locate the template node definition (typically in your ui.content or ui.apps package under /conf or /apps).
  3. Add or update the lastmodified property on the template node. Use the current date and time in ISO 8601 format (For example: 2024-06-01T12:00:00.000Z), and set the property type to Date.
  4. Commit and deploy your changes through the Cloud Manager pipeline.
  5. After deployment, publish the form page again, and verify that the afpolicy and default nodes are no longer republished on every publish action.
recommendation-more-help
experience-cloud-kcs-help-kbarticles