Form is not getting submitted in dispatcher | Community
Skip to main content
Dinu_Arya
Level 6
April 29, 2017
Solved

Form is not getting submitted in dispatcher

  • April 29, 2017
  • 6 replies
  • 5238 views

Hi Team,

We have created AEM forms and they are getting submitted successfully in publish but not in dispatcher.

In dispatcher while submitting the form, we are getting the below alert -

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

On click of submit button we observed the below call in Network tab -

/content/forms/af/<myproject>/<myforms>/<myform>/jcr:content/guideContainer.af.internalsubmit.jsp

Please let me know do I need to change any configuration in the dispatcher.

Thanks,

AryA.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by puradawid

Hey AryA, to be honest:

  1. hard to tell what is your dispatcher configuration
  2. are you getting 404 during this call to that JSP? Is it fine, HTTP OK 200, any other response code? Any content in response?

Some of dispatchers (I am not 100% sure but the default one seems to be done well) are configured to not handle jcr:content (to response with 404 or even worse).

6 replies

puradawidAccepted solution
Level 3
May 1, 2017

Hey AryA, to be honest:

  1. hard to tell what is your dispatcher configuration
  2. are you getting 404 during this call to that JSP? Is it fine, HTTP OK 200, any other response code? Any content in response?

Some of dispatchers (I am not 100% sure but the default one seems to be done well) are configured to not handle jcr:content (to response with 404 or even worse).

smacdonald2008
Level 10
May 1, 2017

The AEM dispatcher should not be interfering with submitted data from a form to a servlet on publish. 

gabork51827145
October 16, 2017

I have the same problem. I got

guideContainer.af.submit.jsp Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Is this a server configuration or something else ?

October 24, 2021

Having the same error.  Can you provide the solution, if you fixed the issue?

srikanthp689160
Level 4
February 21, 2018

Hi,

Were you able to resolve this issue?

If yes, could you please let me know the solution.

Thanks & Regards,

Srikanth Pogula.

leep67941422
March 17, 2021

We have the same issue using AEM 6.5 if you try directly on publish all is well but on dispatcher we get a 400 error on the following  /jcr:content/guideContainer.af.internalsubmit.jsp.

 

Even though this thread says there is an answer I don't see one.

November 8, 2021

I am also getting this same error with AEM 6.5.9 with AEM Forms:

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

Submitting the form on Author is OK, but submitting on Publisher is returning (in Chrome's Console):

POST [domain]/content/forms/af/[form-folder]/[form-name]/jcr:content/guideContainer.af.internalsubmit.jsp 404 (Not Found)
 (anonymous)@csrf.min.js:7
 then@csrf.min.js:6
 XMLHttpRequest.send@csrf.min.js:7
 send@en.min.js:191
 ajax@en.min.js:186
 _doInternalSubmit@guideRuntime.min.js:515
 success@guideRuntime.min.js:516
 getGuideState@guideRuntime.min.js:503
 _submitInternal@guideRuntime.min.js:516
 (anonymous)@guideRuntime.min.js:537
 setTimeout (async)  
 submit@guideRuntime.min.js:535
 eval@VM585:1
 eval@VM508:6
 _expressionHandler@guideRuntime.min.js:640
 executeExpression@guideRuntime.min.js:638
 handleClick@guideRuntime.min.js:747
 k@en.min.js:57
 dispatch@en.min.js:127
 v.handle@en.min.js:124
 trigger@en.min.js:171
 (anonymous)@en.min.js:172
 each@en.min.js:55
 each@en.min.js:52
 trigger@en.min.js:172
 _trigger@en.min.js:217
 (anonymous)@guideRuntime.min.js:201
 dispatch@en.min.js:127
 v.handle@en.min.js:124

 

Does anyone have a solution to this issue?

 

Thanks in advance.

December 19, 2021

Here is what we did to solve this issue.

Add the following dispatcher rule to /etc/httpd/conf.dispatcher.d/filters/publish-filter.any (adjust to your path):

/0261 { /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

Otherwise the dreaded “[AF] [AEM-AF-901-004]: Encountered an internal error while submitting the form” error popup will be displayed for any Publisher form submit.