Expand my Community achievements bar.

SOLVED

Form is not getting submitted in dispatcher

Avatar

Level 7

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.

1 Accepted Solution

Avatar

Correct answer by
Level 3

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).

View solution in original post

8 Replies

Avatar

Correct answer by
Level 3

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).

Avatar

Level 10

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

Avatar

Level 1

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 ?

Avatar

Level 1

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

Avatar

Level 4

Hi,

Were you able to resolve this issue?

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

Thanks & Regards,

Srikanth Pogula.

Avatar

Level 1

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.

Avatar

Level 1

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.

Avatar

Level 1

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.