I am getting the [AF] [AEM-Af-901-004] error while trying to submit the Adaptive form in AEM 6.5 publish instace, while trying to submit the Adaptive form. In author the submit request is reaching backend.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
@user17174 : Do you still see this Issue ?
Have you Validated the CORS Setting ?
Please Note For enabling CORS, you'll need to configure the CORS settings in the OSGi configuration of AEM. The OSGi configuration is used to define the criteria for accepting CORS HTTP requests.
You can access the OSGi configuration through the AEM Web Console Configuration Manager at http://<server>:<port>/system/console/configMgr.
The key configuration properties include:
a) alloworigin and/or alloworiginregexp: Specifies the allowed origins that can access the server.
b) allowedpaths: Specifies the URL path patterns that are allowed from the specified origins.
c) supportedmethods: Indicates which HTTP methods (GET, POST, etc.) are allowed.
d) supportedheaders: Lists the headers that are allowed in CORS requests, such as "Authorization" for authenticated requests.
Reference Documentation : https://experienceleague.adobe.com/en/docs/experience-manager-learn/foundation/security/develop-for-...
Thanks,
Utkarsh
Views
Replies
Total Likes
@user17174 :
Few Questions :
1) What's the Submit Action Configured on the Form ?
Are you Generating DOR on submission ?
2) Please Submit the Form by By-passing the Dispatcher / CDN layer and try to submit it with the Publisher URL.
3) Additionally, what's the error.log say for this ?
Views
Replies
Total Likes
2) Please Submit the Form by By-passing the Dispatcher / CDN layer and try to submit it with the Publisher URL.
When I try to submit the Form by By-passing the Dispatcher layer it works fine. When I try to submit with Domain URL the form is not getting submitted. There is no specific error in the error.logs.
Views
Replies
Total Likes
@user17174 :
Thanks for the Confirmation !
So, The Issue lies with the FQDN / Domain URL.
1) What do you see in Network tab ?
2) Any Errors in the Console logs ?
IMO, This is Somewhat Related to the CORS Policy, Please Validate.
Thanks,
Utkarsh
Views
Replies
Total Likes
1) What's the Submit Action Configured on the Form ?
Are you Generating DOR on submission ?
I am not generating DOR on submission. I have created a custom Submit Action to call the OSGi service on submission of the form. The submission take place com.adobe.aemds.guide.utils.GuideSubmitUtils.
Views
Replies
Total Likes
@user17174 : Do you still see this Issue ?
Have you Validated the CORS Setting ?
Please Note For enabling CORS, you'll need to configure the CORS settings in the OSGi configuration of AEM. The OSGi configuration is used to define the criteria for accepting CORS HTTP requests.
You can access the OSGi configuration through the AEM Web Console Configuration Manager at http://<server>:<port>/system/console/configMgr.
The key configuration properties include:
a) alloworigin and/or alloworiginregexp: Specifies the allowed origins that can access the server.
b) allowedpaths: Specifies the URL path patterns that are allowed from the specified origins.
c) supportedmethods: Indicates which HTTP methods (GET, POST, etc.) are allowed.
d) supportedheaders: Lists the headers that are allowed in CORS requests, such as "Authorization" for authenticated requests.
Reference Documentation : https://experienceleague.adobe.com/en/docs/experience-manager-learn/foundation/security/develop-for-...
Thanks,
Utkarsh
Views
Replies
Total Likes
Hi @Utkarsh_24 ,
I am still facing a issue. When the user submits the Adaptive form the data filled in the form does not get submitted to the backend service and gets redirected with the following query in the URL
?%3Aredirect=%2Fcontent%2Fforms%2Faf%2FHon-Adaptive-Forms%2Fvulnerabilityform%2Fjcr%3Acontent%2FguideContainer.guideThankYouPage.html&%3AselfUrl=%2Fcontent%2F%2Fus%2Fen%2Fproduct-security&_guideValueMap=yes&emailFrom=do-not-reply%40gmail.com&mailToPSIRT=Sayali.Chougale2%40gmail.com&mailToSecurity=Sayali.Chougale2%40gmail.com&subject=This+is+a+Test+Mail&emailTemplate=&assetId=&customerContactEmailAddress=&reporterType=Researcher+&reporterBelongsTo=&components=&publicIssue=Yes+&externalPublich=Yes+&productServiceOption=Product%2FService%2FSolution+&descriptionTech=&subjectTech=#vulnerability-reporting
Views
Replies
Total Likes
My code in the custom submit action JSP is as followed
<%!
private final Logger log = LoggerFactory.getLogger(getClass());
%>
<cq:defineObjects/>
<sling:defineObjects/>
<% log.info("\n ===================== CUSTOM AF ACTION ========================");
VulnerabilityAdaptiveFormService demoService=sling.getService(VulnerabilityAdaptiveFormService.class);
String afResponse=demoService.afService(request);
log.info("\n ===================== CUSTOM AF RESPONSE ========================",afResponse);
%>
Views
Replies
Total Likes
Views
Likes
Replies