Mixed content problems : http - https

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • woodmj
    Senior Member
    • Mar 2013
    • 208
    • 5.7.5

    Mixed content problems : http - https

    Been hitting mixed content problems when testing switching my site to https.

    The bulk of it seems to be http requests sent from https pages looking to load up files in the images directory.

    Just wondered if anyone else has hit this & found a solution? Possibly where to change the http requests to https?

    I've been updating my site address details in the ACP but that doesn't seem to help with this particular issue.
  • Mark.B
    vBulletin Support
    • Feb 2004
    • 24287
    • 6.0.X

    #2
    Firstly, go through out guide and make sure you have completed ALL steps for your version.
    CONVERTING YOUR FORUM TO HTTPS Applies to self-hosted versions of: vBulletin3; vBulletin4; vBulletin5; Cloud sites have https enabled by default and you do not need to do anything. This FAQ explains how to


    The site in your license is throwing the following error:

    Secure Connection Failed

    An error occurred during a connection to www.<snipped>.com. SSL received a record that exceeded the maximum permissible length. Error code: SSL_ERROR_RX_RECORD_TOO_LONG
    MARK.B
    vBulletin Support
    ------------
    My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
    My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

    Comment

    • woodmj
      Senior Member
      • Mar 2013
      • 208
      • 5.7.5

      #3
      Thanks for the response @Mark.B

      I had disabled SSL but it's back on now.

      Now my site is not secure due to calls out to http addresses by eg. forum.php, content.php I think? Example is -
      Mixed Content: The page at 'https://www.xxx.com/forum.php' was loaded over HTTPS, but requested an insecure image 'http://www.xxx/images/gradients/bottom-shadow.png'. This content should also be served over HTTPS.

      Also -
      forum.php:122 A Parser-blocking, cross site (i.e. different eTLD+1) script, https://ajax.googleapis.com/ajax/lib...n-min.js?v=425, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.See https://www.chromestatus.com/feature/5718547946799104 for more details.

      I'd appreciate any of your insights.
      Last edited by woodmj; Sat 9 Sep '17, 4:45am.

      Comment

      • Mark.B
        vBulletin Support
        • Feb 2004
        • 24287
        • 6.0.X

        #4
        It looks like your styles are the main cause. They are loading images over http not https.

        Assuming you've changed the main URL setting, the chances are you are calling the full path of each image in the stylevars (eg http://www.domain.com/images/styles/gradient.png) rather than the relative path (eg images/styles/gradient.png).

        You'll need to go through these and edit the path, either to change each instance of http to https, or to use relative path.
        MARK.B
        vBulletin Support
        ------------
        My Unofficial vBulletin 6.0.0 Demo: https://www.talknewsuk.com
        My Unofficial vBulletin Cloud Demo: https://www.adminammo.com

        Comment

        • djbaxter
          Senior Member
          • Aug 2006
          • 1418
          • 4.2.5

          #5
          For resolving the images issue, you might try this plugin from vBulletin.org: Mini Mods - IMG Cacher - SSL Keeper - Mixed Content Block Solution- vBulletin.org Forum. That worked for me and may save you a lot of time editing individual posts and settings.

          I don't know if that will work for style images specifically but I don't see why not. It basically caches on images so it's loading them in real time from your site instead of from the remote source.
          Psychlinks Web Services Affordable Web Design & Site Management
          Specializing in Small Businesses and vBulletin/Xenforo Forums

          Comment

          • woodmj
            Senior Member
            • Mar 2013
            • 208
            • 5.7.5

            #6
            Originally posted by Mark.B
            It looks like your styles are the main cause. They are loading images over http not https.

            Assuming you've changed the main URL setting, the chances are you are calling the full path of each image in the stylevars (eg http://www.domain.com/images/styles/gradient.png) rather than the relative path (eg images/styles/gradient.png).

            You'll need to go through these and edit the path, either to change each instance of http to https, or to use relative path.

            I didn't find any http references to my forum in the Style Vars but I did find a bunch of 'url(images/xxx/xxx)' so thought these might be the problem & changed them to 'images/xxx/xxx.png' but that didn't seem to help.

            Ran out of ideas? & rolled back after that.

            Comment

            • woodmj
              Senior Member
              • Mar 2013
              • 208
              • 5.7.5

              #7
              Originally posted by djbaxter
              For resolving the images issue, you might try this plugin from vBulletin.org: Mini Mods - IMG Cacher - SSL Keeper - Mixed Content Block Solution- vBulletin.org Forum. That worked for me and may save you a lot of time editing individual posts and settings.

              I don't know if that will work for style images specifically but I don't see why not. It basically caches on images so it's loading them in real time from your site instead of from the remote source.

              Thanks for this.

              Unfortunately the mod doesn't seem to cache the images/styles/* files that seem to be my problem.

              Comment

              • Wayne Luke
                vBulletin Technical Support Lead
                • Aug 2000
                • 74111

                #8
                Originally posted by djbaxter
                For resolving the images issue, you might try this plugin from vBulletin.org: Mini Mods - IMG Cacher - SSL Keeper - Mixed Content Block Solution- vBulletin.org Forum. That worked for me and may save you a lot of time editing individual posts and settings.

                I don't know if that will work for style images specifically but I don't see why not. It basically caches on images so it's loading them in real time from your site instead of from the remote source.

                Or he could just edit the style variables and CSS to make sure the images in his style are loaded with relative URLs instead of absolute URLs. Fixes the problem and prevents additional and unnecessary overhead.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API

                Comment

                • woodmj
                  Senior Member
                  • Mar 2013
                  • 208
                  • 5.7.5

                  #9
                  Probably missing something here but I got where to edit the Style Variables but when I went to edit CSS although it pulled it up for me it said it was obsolete & there was no way to save any changes. This is all in the ACP under Styles & Templates.

                  Comment

                  • woodmj
                    Senior Member
                    • Mar 2013
                    • 208
                    • 5.7.5

                    #10
                    I ended up fixing all the http references in my CSS files using Notepad++'s multi-file search & replace. There was a ton of it. Add an image cacher to avoid any new mixed content & all fixed.

                    Comment

                    • Wayne Luke
                      vBulletin Technical Support Lead
                      • Aug 2000
                      • 74111

                      #11
                      Originally posted by woodmj
                      Probably missing something here but I got where to edit the Style Variables but when I went to edit CSS although it pulled it up for me it said it was obsolete & there was no way to save any changes. This is all in the ACP under Styles & Templates.
                      CSS is edited as templates in vBulletin 4. Choose edit Templates in the Style Manager and you can see all the CSS templates. By default, these should not reference http or https at all. You can use "//example.com/image.gif" as a protocol-relative way of creating URLs in your customizations.
                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud demonstration site.
                      vBulletin 5 API

                      Comment

                      Related Topics

                      Collapse

                      Working...