AEM: Delivery failures in Adobe Campaign Classic due to encoded personalization delimiters

This article describes an issue where delivery failures occur in Adobe Campaign Classic when AEM-authored email templates contain personalization output blocks that are incorrectly encoded after an upgrade. Steps are provided to identify and resolve the issue, particularly when custom Rich Text Editor components are used.

Description description

Environment

  • Adobe Experience Manager (AEM) 6.5 LTS (with Service Pack 2 or later)
  • Adobe Campaign Classic Release 8.9.3

Symptoms

When synchronizing AEM-authored email templates containing personalization output blocks (such as <%= recipient.firstName %>) to Adobe Campaign Classic, delivery preparation fails if the template was authored or edited using a custom Rich Text Editor (RTE) component after the upgrade. The equals sign in the personalization opener is HTML-encoded (&#61;), resulting in &lt;%&#61; recipient.firstName %&gt; in the exported content. Adobe Campaign requires a literal equals sign after <% to recognize an output block; the encoded entity is not recognized, causing compilation to fail. Error messages in Campaign may include:

  • JST-310054 Warning: Couldn’t compile script ‘content htmlContent’
  • SCR-160032 JavaScript: error while compiling script ‘content htmlContent’
  • JST-310007 Unable to compile script (content htmlContent)

This issue affects newly synchronized templates and existing templates that are refreshed or re-synchronized. Templates synchronized before the upgrade and not re-synchronized remain unaffected. The problem is specific to templates authored or edited using custom RTE components; standard components patched by Adobe’s official fix are not affected.

Cause

A regression in AEM 6.5 LTS (after Service Pack 2) introduced stricter XSS/serialization handling in the Rich Text Editor, causing the equals sign in personalization delimiters (<%=) to be HTML-encoded in custom components. Adobe’s official fix only patches the standard personalization component; custom components require a targeted configuration update.

Resolution resolution

Follow the steps below to resolve the issue.

  1. Identify if your AEM instance uses custom Rich Text Editor (RTE) components for authoring email templates with personalization blocks.
  2. Confirm that the exported content contains &lt;%&#61; instead of <%= in the .campaign.content.json output for affected templates.
  3. Review if the official Adobe fix for the standard personalization component is installed and which components it covers. If your custom component is not covered, proceed to the next step.
  4. Update your custom RTE component’s configuration to preserve the <%= %> delimiter and prevent HTML encoding of the equals sign. Use the same technical approach as the official fix, but apply it to your custom component.
  5. Deploy the updated component to a staging environment.
  6. Author a test email template with a personalization block, synchronize it to Adobe Campaign, and attempt a delivery.
  7. Confirm that personalization renders correctly and no compilation errors occur in Campaign.
  8. Once validated, deploy the fix to your production environment following your internal release process.
  9. Review other custom RTE components in your environment that may output non-HTML or templating-style syntax, as they may also be affected…
recommendation-more-help
experience-cloud-kcs-help-kbarticles