• Hi,

    I’ve been having a few issues with mixed content on a secure booking page.

    I am securing two pages on my site using https. I have used the Secure Post checkbox on each page. This works fine and when navigating to these pages they use https.

    For all other pages I am using http. I have used the ‘Force SSL Exclusively’ option in the main settings.

    The issue occurs on a form post:

    <form role=”search” id=”searchform” class=”search” method=”get” action=”<?php echo home_url( ‘/’ ) ; ?>”>

    Everytime the page renders it always appears as http. This confused me for a long time until I turned off the secure post and force ssl exclusively and navigated to the page manually using https. When I did this the page rendered correctly and picked up the fact that it was https.

    I was wondering if you had come across this before and whether you could recommend a fix for this?

    I look forward to hearing from you!

    https://www.ads-software.com/plugins/wordpress-https/

Viewing 10 replies - 1 through 10 (of 10 total)
  • I’m having the same issue, did you manage to find the problem?

    Thanks

    Thread Starter jockking

    (@jockking)

    Sadly no.

    I ended up removing the search functionality from the page. Once this was gone everything started working as expected.

    Thanks for updating – I went down the same road in the end.

    Tried many plugins but none yet seem to accommodate this form issue which I believe is only visible on Chrome.

    This looks similar to what I just posted in this forum here: https://www.ads-software.com/support/topic/problems-with-wordpress-search-form

    The problem is, I like my search form on my page!

    But until I can figure out a solution to this problem the search form remains insecured and Google Chrome users will see a little note on their padlock saying that there is an insecure form on the page.

    Mine is a donation page, so who is going to make a donation if there is an insecure “form?”

    I know that it is the search form, but the average user will just be concerned with the vague warning.

    I’ve tried turning off the option to force the rest of the pages to http, but that leaves some pages rendering as https that won’t show the necessary content because that content is not https.

    Very frustrating.

    If anybody finds a solution whereby this https plugin can work without causing problems with the search form I will be dancing for joy.

    ??

    Would it be accurate to call this a “bug” in the https plugin?

    I guess so – but the last time the plugin was updated was likely before Chrome added this extra security measure so not sure if its being maintained…

    I don’t think it would be too hard to fix, but it could become quite tricky…

    Think, if on a https page, you want a form (eg, search), then the forms action must point to a https page – this doesn’t sound like a problem however this also means that the resulting page must support https

    But then that means the page the form submits to also needs to be https…

    [edit] – actually the above works fine! Make sure the page your form submits to is also served via https – so add some rules if necessary and my page is now working fine.

    Only problem is in the search scenario, that you must force your search results to use https – which might not be what you want in many cases.

    ??

    Thanks DesignsAndCode.

    I thought about doing that, but the page my form submits to is the home page of the site and I don’t want the home page to be ssl at this point.

    So far, turning off search completely has been the only thing that works, but then of course – no search! ??

    Hey ThirstyJon

    Think about SSL in general (not just this plugin)…

    If you don’t want a mixed content warning all forms on secure pages must submit to https URLs.

    This means with or without this plugin what you are trying to achieve is basically impossible (that is, you don’t want the homepage to have https)…

    I think this is just the nature of https and Chrome’s specific checks – however it does make sense to me why they would implement this and I’m guessing other browsers will follow suit.

    If I was you I would setup a second “homepage” or a results page to handle the form with https.. Just my two cents ??

    I found a solution.

    I deactivated the WordPress HTTPS plugin completely.

    I installed a plugin called iThemes security.

    I marked the little checkbox to enable SSL on the page I want secured.

    I went into the general wordpress settings and added the s to the two links for home and wordpress.

    I installed and activated a plugin called SSL Insecure Content Fixer. (Not sure how much this one did).

    Result: Only the page I wanted is secured, all of the others automatically go to insecure, the search box remains and is functional.

    Voila. Problems solved.

    ??

    P.S. the Homepage goes to non ssl just like I want it to, even though the settings say https.

    Excellent! Will try it although that plugin (iThemes) cause me a lot of problems last time I enabled it that I just didn’t have the patience to sort out.

    So does your search form point to “https”? and when you search is the homepage as “https” or has there been some kind of redirect back to “http”?

    Thanks for letting me know!

    I ignored all the other functionality of that ithemes security plugin. I have other plugins that I use for wordpress security.

    We’ll see if I have any problems.

    At the site if I right click on the search box and choose “inspect element” in chrome I can see that now the action is to the secure site. But when it actually opens up it is redirected back to the not secure site.

    I think that is because I do not have my home page marked as “enable ssl” in the ithemes security plugin, so it is automatically being redirected to the non secure version.

    So… Perfect. At least for my needs.

    ??

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Form Posts using home_url()’ is closed to new replies.