Error while submitting form | Community
Skip to main content
Level 2
October 24, 2018

Error while submitting form

  • October 24, 2018
  • 1 reply
  • 7130 views

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/guideContainer.guideAsyncThankYouPage.html?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

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

1 reply

Mayank_Gandhi
Adobe Employee
Adobe Employee
October 24, 2018

Does that happen with thank-you message as well?

Level 2
October 24, 2018

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

Level 2
October 24, 2018

Hi Akhila,

There are few articles available for Solving/enabling Mixed Content. Please see if this helps.

Since v38, Chrome extension cannot load from HTTP URLs anymore, workaround? - Stack Overflow

Preventing Mixed Content  |  Web Fundamentals  |  Google Developers

K12 School Support


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