SSL mixed content on Pro Sites checkout

Hello.

Earlier this year, i got help from Thomas to make the HTTPS work on my site. (Link: https://premium.wpmudev.org/forums/topic/force-https-ssl-on-mainsite-and-http-on-subsites) Our site should only load HTTPS on the Pro Sites checkout page, and we got it all to work at the end. But after I switched theme, the problem is back. I have a messed up checkout page, because the page has mixed content loaded from HTPP and not HTTPS.

You have support access. Please help :disappointed:

  • Rupok
    • Support Ninja

    Hi Mathias

    I hope you had a wonderful day.

    I can see that there were lots of code snippets given to solve your problem. Can you please confirm exactly which code block solved your problem?

    If the last code block solved your problem that time, please tell me where did you add that code block.

    If you added that code block in your theme's functions.php file, then you need to create mu plugin for making it work on all themes. For creating a mu plugin, create a directory named "mu-plugins" inside "wp-content" folder. Now inside that "mu-plugins" folder, create a file with any name and a .php extension. Now paste that code block inside your newly created file, save it and you are done.

    Now this fix will work on all themes.

    Please let us know if you have any further confusion. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Rupok
    • Support Ninja

    Hi Mathias

    I hope you had a wonderful day.

    This is weird becuase .htaccss rules are not dependent on themes. Did you try reverting back to the previous them which was working? If not, can you please go back to the working theme and check if the problem is still occurring or not?

    And moveover, can you please move all the rules under this lines:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>

    and make sure, the ending lines are:

    </IfModule>
    # END WordPress

    I'm looking forward to know the answers from you and solve this problem as soon as possible.

    Have a nice day. Cheers!
    Rupok

    • Mathias
      • The Bug Hunter

      If I switch back to the old theme, the problem doesn't occur.

      I have both caching and gzip code in my .htaccess, and the code they made me in the previous thread took very long time to get done, so I don't want that to happen again.

  • Rupok
    • Support Ninja

    Hi Mathias

    I hope you had a wonderful day.

    As you are not willing to try testing with .htaccess, I've got another workaround for you. Can you please access your database with PHPMyAdmin or any other tool? Then please go to "wp_options" table (I'm assuming your database default prefix is wp_) and change the "siteurl" and "home" both from "http://bloggerspoint.dk/" to "https://bloggerspoint.dk/" ?

    It should redirect your main site to https:// but not subsites as those are not configured with SSL.

    Please let me know the result or if you face any kind of difficulty in doing this. We will be glad to help.

    Have a nice day. Cheers!
    Rupok

  • Mathias
    • The Bug Hunter

    Hi,

    I can't do that, as all our posts from sites across the network that is displayed on our homepage, will link to the site with HTTPS, and it will give the user a warning. We don't want that!

    Is it possible we maybe can get some of the guys from the last thread to help me with this thread, as they maybe know better what I am talking about? Or should I just reopen the old thread?

  • Rupok
    • Support Ninja

    Hi Mathias

    I just went to "http://bloggerspoint.dk/" and it was loading normally without SSL. Then I went to "http://bloggerspoint.dk/opgrader/" and it automatically redirected me to "https://bloggerspoint.dk/opgrader/" which is with SSL. So did you manage to fix it in the mean time? Or the current theme is the working one, and when you change the current theme, it stops working?

    I can help if I can see the error in action. It seems like it's a live site and I don't think it's wise to change the theme now and make some test. So can you please make a staging server where I could make some tests and fix the issue ASAP? What do you suggest?

    FYI, staging server is a 100% clone copy of your current website. You can get more idea about how people are creating their staging servers, from this link: https://premium.wpmudev.org/blog/wordpress-staging-environment/

    Have a nice day. Cheers!
    Rupok

  • Rupok
    • Support Ninja

    Hi Mathias

    Yeah, now I get it. It's happening because you are loading the page with SSL but contents are being requested without https. That's why it's giving a mixed-content warning and blocking lots of things to be loaded.

    It seems like stylesheet URLs are hardcoded with http:// and that's why it's being forced to request data from URLs without https://

    Please replace "http://" with just "//" of the URLs in your theme and inside that page. For example, if the current URL is "http://www.example.com/image.png", make it like "//www.example.com/image.png".

    It will fix all the warnings and won't block the resource anymore.

    Have a nice day. Cheers!
    Rupok

  • Rupok
    • Support Ninja

    Hi Mathias

    Can you try installing "WP Force SSL" plugin and see if your issue is resolved? You can download the plugin from here: https://wordpress.org/plugins/wp-force-ssl/

    As you find it risky to change anything in your current site, it's really tough for us to make some test and find the issue. So, as I said before, can you please make a staging server where I could make some tests and fix the issue ASAP? What do you suggest?

    FYI, staging server is a 100% clone copy of your current website. You can get more idea about how people are creating their staging servers, from this link: https://premium.wpmudev.org/blog/wordpress-staging-environment/

    Have a nice day. Cheers!
    Rupok

  • Rupok
    • Support Ninja

    Hi Mathias

    I hope you had a wonderful day.

    That's awesome! Can you please take a full backup of your site before we do anything else on your site?

    Most probably I can tell you on which file to edit and which line to change. But for doing that, I need to check the files of your custom theme. So can you please send me message with FTP access credentials through our secure contact form here: https://premium.wpmudev.org/contact/

    Subject: "Attn: Rupok"
    - FTP Login Username
    - FTP Login Password
    - FTP Host URL
    - Link back to this thread for reference
    - Any other relevant URLs

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me.

    I'm looking forward to hear from you and solve this problem as soon as possible.

    Have a nice day. Cheers!
    Rupok

  • Rupok
    • Support Ninja

    Hi Mathias

    I got your info and checked the overall scenario. After some test, I found that replacing "http://" with "//" won't work.

    Let me describe you the situation. All your pages in the main site is loading from "http://" and your server doesn't have SSL configured. So all the pages are loading fine. But when you are trying to access this page "https://bloggerspoint.dk/opgrader/" with SSL, then all your CSS and JS files are still served without SSL and that's why, browser is blocking those content for security. So, editing those file links won't work.

    So technically, the best solution is configuring your server with SSL. Then use SSL for your main domain. You can still keep all your subdomains without SSL. I'm wondering how it was working in your previous theme. Can you please activate that theme where it was all working and let me know?

    This issue is really interesting and I'm willing to fix it ASAP.

    Have a nice day. Cheers!
    Rupok

    • Mathias
      • The Bug Hunter

      Maybe you can ask Jude an Michael from the previous thread as they fixed the problem with the old theme? With the old theme we faced the same problem, with all the images and stylesheets missing, but they were able to fix it.

      The old theme is deleted :slight_frown:

  • Rupok
    • Support Ninja

    Hi Mathias

    I'm so sorry for the delay and I've again pinged our SLS Team to have a look on this. Please keep in mind our SLS Team Members work round the clock and have to deal with lots of critical issues and other things. So it may take a little while for them to work on this.

    But as this already got delayed, I myself would like to try fixing this again until the SLS team checks this. I tried to use the credentials you sent us through our secure contact form, but that is not working anymore.

    So Would you mind allowing support access so we can have a closer look at this?

    To enable support access you can follow this guide here:
    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Moreover, can you please send me message with FTP and Database access credentials through our secure contact form here: https://premium.wpmudev.org/contact/

    Subject: "Attn: Rupok"
    - FTP Username
    - FTP Password
    - Host
    - Database Access URL
    - Link back to this thread for reference
    - Any other relevant URLs

    Select "I have a different question" for your topic - this and the subject line ensure that it gets assigned to me.

    I'm looking forward to solve this for you as soon as I can. And I believe, our SLS Team will work on this soon.

    Have a nice day. Cheers!
    Rupok

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.