Publishing pages with deeply nested Content Fragments

This article describes how to address situations where AEM Sites pages referencing deeply nested Content Fragments fail to publish because of timeouts during the recursive reference search process.

Description description

Environment

Adobe Experience Manager as a Cloud Service (all versions)

Issue/Symptoms

When publishing AEM Sites pages that reference Content Fragments with deep or wide nested references, the page does not appear in the Manage Publication payload and is not published. This occurs when a Content Fragment references many other Content Fragments, resulting in thousands of nested references and multiple levels of nesting. The reference check process becomes slow and may time out, preventing the page from being included in the publication workflow. No explicit error message appears in the UI, but the expected page is missing from the publication payload.

Cause

The recursive reference search for deeply nested Content Fragments can cause performance degradation and timeouts, preventing pages from being included in the publication payload. Disabling the recursive search improves performance but requires manual management of nested fragment publication.

Resolution resolution

To fix the issue where AEM Sites pages referencing deeply nested Content Fragments fail to publish, follow these steps:

  1. Disable recursive Content Fragment reference search by updating the configuration for com.day.cq.wcm.core.impl.reference.ActivationReferenceSearchServiceImpl and setting the option to disable recursive Content Fragment reference search.

  2. Update the configuration via Cloud Manager:

    • In your Cloud Manager project, add or update the OSGi configuration file for com.day.cq.wcm.core.impl.reference.ActivationReferenceSearchServiceImpl.
    • Set "enable.recursive.cf.reference.search": false in the configuration.
    • Commit and deploy the configuration through your Cloud Manager pipeline.
  3. Alternatively, update the configuration through the OSGi Console in local or non-production environments:

    • Log in to the AEM Author instance.
    • Navigate to /system/console/configMgr.
    • Search for ActivationReferenceSearchServiceImpl.
    • Edit the configuration and set recursive Content Fragment reference search to false.
    • Save the configuration.
  4. After disabling recursive search, attempt to publish the affected page again using Manage Publication. The page should now be included in the publication payload and publish successfully.

  5. Manually publish deeply nested Content Fragments as needed. With recursive search disabled, only first-level references are automatically resolved. Ensure all required nested Content Fragments are published by manually publishing them via the CF/Assets consoles, or by including relevant CF folders in your publishing process.

recommendation-more-help
experience-cloud-kcs-help-kbarticles