Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Error while submitting form

akhilat9657589
Level 3
Level 3

Hi All,

I have created an adaptive form and I have a requirement to do certain functions based on the input submitted and show a modal popup once form is submitted successfully.

I have customized submit action as below.

guideBridge.registerConfig("submitConfig", {"useAjax" : true});

guideBridge.submit({

  error : function (guideResultObject) {

  },

  success : function (guideResultObject) {

  $.ajax({

                   url: "/bin/wcm/testproject/books",

                   data: {dataXml: guideResultObject.data},

                   success: function(result){                  

        $("#myModal").modal('show');                               

    }});

  }

});

It is working as expected on local. But when I try to submit the form on staging, I am getting below error.

Mixed Content: The page at 'https://author-stg.myproject.org/content/test/en/form/country-form.html' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://author-stg.myproject.org/content/test/en/form/country-form/jcr:content/mainContent/guideConta...?owner=Ravi&afSuccessPayload=%7B%22thankYouOption%22%3A%22page%22%2C%22thankYouContent%22%3A%22%2Fcontent%2Ftest%2Fen%2Fform%2Fcountry-form%2Fjcr%3Acontent%2FmainContent%2FguideContainer.guideThankYouPage.html%3Fowner%3DRavi%26status%3DSubmitted%22%7D&status=Submitted'. This request has been blocked; the content must be served over HTTPS.

Why one request is being an http request? How can I solve this?

Kindly advise.

Thanks,

Akhila

8 Replies
Mayank_Gandhi
Community Advisor
Community Advisor

Does that happen with thank-you message as well?

akhilat9657589
Level 3
Level 3

Hi Mayank,

If I didn't customize the submit action, form submission will be successful and will get redirected to thanks page. But as per my requirement, I don't want to get redirected to thanks page, but to show thanks message in modal.

So to show thanks content in modal, I have customized submit action.

Thanks,

Akhila

akhilat9657589
Level 3
Level 3

Yes Mayank. It is working as expected in IE. Only on chrome I have this issue.

Thanks,

Akhila

akhilat9657589
Level 3
Level 3

Thanks Mayank for sharing URLs.

I looked into the URLs shared. As a primary solution they are mentioning is to use the https version of page. But in my case, I am not sure where and http is getting requested as I am using guideBridge.submit method which is OOB.

Is there any solution where we can avoid calling "'http://author-stg.myproject.org/content/test/en/form/country-form/jcr:content/mainContent/ guideContainer.guideAsyncThankYouPage.html"

I am not understanding how it is getting called. I tried by making the checkbox "Use  Asynchronous Submission" checked. But then "....guideSyncThankYouPage.html" is getting called which is agin http request.

Thanks,

Akhila

Mayank_Gandhi
Community Advisor
Community Advisor

Hi Akhila,

Any success here? Or, is it still unresolved.

akhilat9657589
Level 3
Level 3

Hi Mayank,

We could fix the issue by changing below configuration.

https://helpx.adobe.com/experience-manager/kb/AEM-redirecting-back-to-http-on-accessed-via-SSL-termi...

III. Update the Header Configurations:

1. Go to http://host:port/system/console/configMgr/org.apache.felix.http.sslfilter.SslFilter, and log in as administrator.

2. Set SSL forward header to X-Forwarded-Proto.

3. Set SSL forward value to https.

4. Click Save.

Thanks,

Akhila