내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards
해결됨

Exporting XF to Adobe Target - HTML XF gives issue - PageModel cannot be correctly instantiated by the Use API

Avatar

Community Advisor

Hi All,


We are exporting and updating XF to Adobe Target. The cloud configuration is working correctly as expected.
However, when we export it as HTML XF, we get the below error in Target for rendering - 
<head><title>500 org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: Identifier ca.projectX.core.models.PageModel cannot be correctly instantiated by the Use API</title></head>
<body> <h1>org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: Identifier ca.projectX.core.models.PageModel cannot be correctly instantiated by the Use API</h1> <p>Cannot serve request to /content/experience-fragments/projectX/test-xf-12/test-xf-12.nocloudconfigs.atoffer.html on this server</p>

@Preetpal_Bindra - I saw your reply to the other question at Exported Experience Fragment not working in Target
Here are the details for the same - 

  1. All XF of type HTML are having this issue while the JSON export works correctly.
  2. We are setting up the Target for the first time.
  3. This is an AEM Cloud setup.

We are already having the node /content/experience-fragments/projectX/test-xf/test-xf.noloudconfigs.atoffer present to remove the clientlibs from XF when exporting to Target.

Any further steps to help troubleshoot?
@Gokul_Agiwal, @alexbishop  

 

Best Regards,

Rohan Garg

 

주제

토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

The root cause is that Adobe Target cannot execute AEM backend Sling Models referenced in your exported HTML because Target only renders static HTML or client-side JavaScript
The fix for this involved using the "noloudconfigs" to exclude backend-dependent scripts.

We validated the export URL /content/experience-fragments/projectX/test-xf/test-xf.noloudconfigs.atoffer.html is stripped of backend dependencies.

원본 게시물의 솔루션 보기

1 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

The root cause is that Adobe Target cannot execute AEM backend Sling Models referenced in your exported HTML because Target only renders static HTML or client-side JavaScript
The fix for this involved using the "noloudconfigs" to exclude backend-dependent scripts.

We validated the export URL /content/experience-fragments/projectX/test-xf/test-xf.noloudconfigs.atoffer.html is stripped of backend dependencies.