[AF] [AEM-Af-901-004] error IN Publish when the Adaptive Form is submitted. | Community
Skip to main content
New Member
April 4, 2025
Solved

[AF] [AEM-Af-901-004] error IN Publish when the Adaptive Form is submitted.

  • April 4, 2025
  • 1 reply
  • 827 views

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.

Best answer by utkarsh_241

@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-cross-origin-resource-sharing



Thanks,
Utkarsh

1 reply

Adobe Employee
April 4, 2025

@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 ?

user17174Author
New Member
April 7, 2025

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.

utkarsh_241Adobe EmployeeAccepted solution
Adobe Employee
April 17, 2025

@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-cross-origin-resource-sharing



Thanks,
Utkarsh