AEM forms/ Adobe Form submission failure on publish instance. Error code: AEM-AF-901-004

1k Views Asked by At

AEM version/SP: 6.5.11

AEM forms add-on package: adobe-aemfd-linux-pkg-6.0.566-NPR-37836-B0001.zip

I've created an AEM form on author instance. The form submission is working in author instance. When I publish the form from the console & test it in publish instance, the form submission is failing. Types of submit action tested:

  1. No action configured
  2. Forms Portal Submit action
  3. Send PDF via email
  4. Send email
  5. Submit to Rest endpoint
  6. Use asynchronous submission - i) Redirect to URL ii) Show message

To summarize, I've tested multiple variations of form submit actions. But none of the scenario is working.

Alert message[Screenshot attached]:

[AF] [AEM-AF-901-004]: Encountered an internal error while submitting the form.

The difference that I observe in author-submission & publish-submission is that: /aem-forms-01/jcr:content/guideContainer.af.internalsubmit.jsp

This above mentioned request is failing in publish instance. In publish instance the request attributes are:

  • the error code I see is Status Code: 500 Server Error
  • the request header for content type is - Content-Type: text/html;charset=utf-8 whereas, in author instance the request header shows content-type as - application/json [screenshot attached].

From the error logs I understand that

  • In author instance the form data is submitted as application json, as expected, and so it works.
  • In publish instance the form data is submitted as plain text format and the data is expected to be in json format hence get following error:

com.adobe.aemds.guide.internal.impl.servlet.GuideInternalSubmitServlet Expected a ':' after a key at character 7 of {"guideState":{"guideDom": [...error trace continued]

Kindly provide suggestions to resolve this issue in AEM publish instance

Please refer the following screenshots.

Form creation

AEM form submit error - publish

AEM form submit content-type - publish

AEM form submit content-type - author

1

There are 1 best solutions below

0
On BEST ANSWER

If you have dispatcher at front, add the following rule to allow those URLs to be served:

/0229 { /type "allow" /method "POST" /path "/content/forms/af/[A-Za-z0-9-]*/[A-Za-z0-9-]*/jcr:content/guideContainer*" /extension '(jsp)'}  # allow POSTs to submit AEM Forms under /content

Review configurations at https://experienceleague.adobe.com/docs/experience-manager-65/forms/install-aem-forms/configure-aem-forms/configure-adaptive-forms-cache.html?lang=en