AEMaaCS: Content fragment publish API fails due to invalid fragment

✨ This content is AI generated and could be inaccurate. Generative AI Terms

This article explains how to resolve failures when publishing a content fragment using the AEM as a Cloud Service /adobe/sites/cf/fragments/publish API, where the fragment is removed from the publish tree due to validation errors.

Description description

Environment

Adobe Experience Manager as a Cloud Service (AEMaaCS), all versions.

Symptoms

When attempting to publish a content fragment using the /adobe/sites/cf/fragments/publish API, the fragment fails to be pushed to preview or publish environments. The following warning appears in the error log:

Fragment ’

The fragment is not published, and any content pages depending on it may fail to render, impacting release readiness. This issue is specific to fragments that reference other fragments or assets. The error does not specify which field or rule failed validation. Other fragments may publish successfully, or may fail with different messages such as “invalid references”.

Cause

The fragment failed validation against its Content Fragment Model due to one or more field-level issues, such as exceeding character limits, invalid enumeration values, missing required fields, or disallowed referenced models. The publish workflow removes invalid fragments from the publish tree to prevent inconsistent content deployment.

Resolution resolution

Follow the steps below to resolve the issue.

  1. Run a GET request to /adobe/sites/cf/fragments/<fragment-uuid> on the author environment.

  2. Review the validationStatus section in the response for details on which field(s) failed validation.

  3. Alternatively, open the fragment in the Content Fragment editor and check both the master and all variations for validation errors.

  4. Address any flagged fields, such as:

    • Single-line text fields exceeding 255 characters (default limit if not set in the model).

    • Dropdown (enumeration) fields with values not allowed by the current model.

    • Required fields left empty in any variation.

    • Fields containing more items than permitted by the model.

    • Asset or image paths that do not exist.

    • Referenced fragments whose models are not allowed for the field.

    • Field data that is no longer defined in the current model (e.g., after a model change).

  5. Save the fragment after making corrections.

  6. Republish the fragment using the /adobe/sites/cf/fragments/publish API or the AEM UI.

  7. Confirm that the fragment is now available in the preview/publish environment and that dependent content renders as expected.

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