Campaign: AEM templates synchronization fails after changing templates location in AEM

When Adobe Campaign attempts to synchronize an AEM email template through the .campaign.link.json endpoint, the operation can fail with a JST-310000 JSON.parse error even though the template appears to exist and basic synchronization seems to work. This issue can occur when a custom AEM email page component inherits from the Email Core Components page using an absolute repository path instead of the relative resource type expected by Sling servlet resolution.

Description description

A customer reported that older AEM email templates continued to work, but newer templates based on an email page component failed when opened or synchronized from Campaign.

The visible symptom in Campaign was aJST-310000 Error while compiling script ‘nms:amcIntegration.js’ caused by JSON.parse.

The customer was trying to push new campaign templates page from AEM which were built on email core component and editable in nature.
The resource type being used was : /apps/aem-crm/components/email/page and superType was : /apps/core/email/components/page/v1/page which is recommended by Adobe as old mcm components are going to be deprecated.

Overall the synchronization between AEM and Campaign was working and the templates were visible in the selection list but when the new templates on email core component were selected, the error appeared.

The customer added appropriate values to the option AEMResourceTypeFilter in Campaign:
mcm/campaign/components/newsletter,mcm/campaign/components/campaign_newsletterpage,mcm/neolane/components/newsletter,/apps/aem-crm/templates/campaign-newsletter-template-2025,/apps/aem-crm/components/email/page,/apps/core/email/components/page/v1/page

Resolution resolution

Root Cause

The synchronization fails because AEM’s LinkServlet (which handles the .campaign.link.json endpoint and returns the JSON that Campaign expects) is not being invoked for problematic template. Instead, Sling’s default POST handler runs and returns an HTML response — which Campaign then fails to parse (JSON.parse error).

This happens because customer’s component /apps/aem-crm/components/email/page declares its sling:resourceSuperType using an absolute path:

sling:resourceSuperType = “/apps/core/email/components/page/v1/page”

The LinkServlet is registered for the relative form core/email/components/page/v1/page (without /apps/). Sling treats these as different keys, so it cannot find the servlet by walking the component hierarchy.

Resolution

In customer’s custom component definition (/apps/aem-crm/components/email/page/.content.xml in their AEM project source), change sling:resourceSuperType from the absolute path to the relative form:

< !-- Before –>
sling:resourceSuperType=“/apps/core/email/components/page/v1/page”

< !-- After –>
sling:resourceSuperType=“core/email/components/page/v1/page”

Redeploy the component package after this change. Sling will then correctly walk the superType chain and invoke the LinkServlet, returning JSON to Campaign and resolving the synchronization error.

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