adobe / adobe/aem-core-email-components
cannot link AEM content in ACS
- Dominant language
- Java
- Stars
- 16
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
I have AEM linked to ACS and an old email campaign with the legacy components can link with ACS just fine.
When I try and link a new email campaign using these core email components, I'm getting a 'Response is not valid JSON'. From what I can tell, ACS is looking for a response of content/campaigns/brand/master/emails/myemail.**campaign.content.json** and when I try this request on author (or publish) I get the same error as below. I thought this was because of https://github.com/adobe/aem-core-email-components/blob/main/examples/ui.apps/src/content/jcr_root/apps/core-email-components-examples/config/rewriter/email-link-rewrite/.content.xml but after implementing this for my project, it still wouldn't work. Any tips would be massively helpful. Thanks.
```
Response is not a valid JSON:
Error during include of component '/apps/wetrain/components/email/page'
Error Message:
java.lang.NullPointerException: no mapping for html
Processing Info:
Page=/content/campaigns/wetrain/master/campaign-emails/training-emailResource Path=/content/campaigns/wetrain/master/campaign-emails/training-email/jcr:contentCell=pageCell Search Path=page|basicpageComponent Path=/apps/wetrain/components/email/page
Sling Request Progress:
0 TIMER_START{Request Processing}
1 COMMENT timer_end format is {<elapsed microseconds>,<timer name>} <optional message>
4 LOG Method=POST, PathInfo=null
5 TIMER_START{handleSecurity}
1358 TIMER_END{1351,handleSecurity} authenticator org.apache.sling.auth.core.impl.SlingAuthenticator@54d6f62f returns true
1537 TIMER_START{ResourceResolution}
2486 TIMER_END{947,ResourceResolution} URI=/content/campaigns/wetrain/master/campaign-emails/training-email.campaign.content.json resolves to Resource=JcrNodeResource, type=cq:Page, superType=null, path=/content/campaigns/wetrain/master/campaign-emails/training-email
2491 LOG Resource Path Info: SlingRequestPathInfo: path='/content/campaigns/wetrain/master/campaign-emails/training-email', selectorString='campaign.content', extension='json', suffix='null'
2492 TIMER_START{ServletResolution}
2495 TIMER_START{resolveServlet(/content/campaigns/wetrain/master/campaign-emails/training-email)}
2504 TIMER_END{8,resolveServlet(/content/campaigns/wetrain/master/campaign-emails/training-email)} Using servlet /libs/cq/Page/campaign/content.json.POST.jsp
2507 TIMER_END{14,ServletResolution} URI=/content/campaigns/wetrain/master/campaign-emails/training-email.campaign.content.json handled by Servlet=/libs/cq/Page/campaign/content.json.POST.jsp
2509 LOG Applying Requestfilters
```
Contributor guide
Research direction
Start by reproducing the POST request to /content/campaigns/wetrain/master/campaign-emails/training-email.campaign.content.json and read the logged error for /apps/wetrain/components/email/page. Compare the referenced email-link-rewrite/.content.xml configuration with the request processing details, including the “no mapping for html” exception. Done means the campaign content endpoint returns valid JSON for the core email components.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100