Custom JCR property loss on authoring change and replication in AEMaaCS

This article provides a solution to address the issue of custom JCR properties being lost when authoring changes are made and content is replicated in Adobe Experience Manager as a Cloud Service (AEMaaCS). It explains why the issue occurs and provides a step-by-step guide to ensure the persistence of these properties.

Description description

Environment

Adobe Experience Manager as a Cloud Service (AEMaaCS)

Issue

When a custom JCR property is added directly to a node associated with a multi-field component in an experience fragment, it may not persist after authoring changes or replication. The following symptoms are observed:

  • Custom properties are lost after saving authoring changes.
  • Replication processes overwrite or delete these properties.

This behavior arises because multi-field components manage their properties dynamically based on dialog configurations, which dictate what is saved and replicated.

Resolution resolution

  • Update dialog configuration:

    • Ensure that all custom properties are explicitly defined in the component’s dialog XML configuration.
    • Add corresponding fields for the custom properties to the dialog structure to ensure they are recognized and saved.
  • Multi-field component handling:

    • Multi-field components store their entries as separate child nodes under a parent node in the JCR.
    • Define the necessary properties within the component’s dialog or configuration files to prevent overwrites during processing.
  • Extend the component

    • Extend your existing component by adding fields for each custom property you need. For example, include a tariffItem field in your extended component setup, if you are using it.
  • Use hidden field configurations and directly write the step-- For properties that should not appear in the UI, but need to be programmatically retained, configure hidden fields with the following settings:

Name: granite:hidden  

Type: Boolean  

Value: true

  • Test and validate

    • Test the updated configurations in a local environment before deploying to production.
    • Use standard AEM projects (For example: WKND) for initial testing to validate changes without interference from additional customization layers.
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f