[Resolved] non SSL references on SSL website

Home Forums Support [Resolved] non SSL references on SSL website

Home Forums Support non SSL references on SSL website

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #868139
    Steig

    Hello,

    I started building a website without have an SSL certificate and then implemented it after the fact. via Settings / general, I changed the URL to reflect the SSL cert. However, I still was receiving a message that parts of the website weren’t secure.

    So I put this text into the functions file:

     * Force URLs in srcset attributes into HTTPS scheme.
     * This is particularly useful when you're running a Flexible SSL frontend like Cloudflare
     */
    function ssl_srcset( $sources ) {
      foreach ( $sources as &$source ) {
        $source['url'] = set_url_scheme( $source['url'], 'https' );
      }
    
      return $sources;
    }
    add_filter( 'wp_calculate_image_srcset', 'ssl_srcset' );

    This worked for a few browsers, but I still am noticing when I view the source of the site that many of the generate press calls all still reflect http:// verses https://

    How can the entire site be updated to all reflect https:// calls through out it?

    GeneratePress 2.2.2
    GP Premium 1.7.8
    #868202
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That function shouldn’t be necessary. It’s the URLs inside your content/Customizer that need updating.

    A plugin like this should help: https://wordpress.org/plugins/velvet-blues-update-urls/

    #868697
    Steig

    I’ve installed that plugin and it did report a few URL changes were made. However, the problem I’m dealing with still remains. Specifically, using Firefox, when I click on the green padlock in the URL bar, I get a notice that FF has blocked parts of the website that aren’t secure. The only part blocked in the logo at the top of the page.

    The logo is contained in the media tab in wordpress. I think I’m using all SSL calls. Any idea on what could be doing this?

    #868847
    Tom
    Lead Developer
    Lead Developer

    Hmm, I’m not seeing that issue when I visit the URL with https. However, I am seeing a cross-origin issue. If you right click the page and click “Inspect”, you’ll see some notices in the “Console” tab. It seems some resources are being loaded from a different URL? Maybe this is a staging site and some resources are coming from the non-staging site?

    #868932
    Steig

    Ok, I see what you are talking about that those two entries are the logo. So that is the problem. The URL you are seeing is what I started out building the website using. It is still accessible via that URL. However, in order to get SSL in place, I created a subdomain on a related website that had SSL and pointed to that URL. I then went into Settings / general and updated the wp address and site address to the new HTTPS url. I’ve even deleted that file from the media library and reloaded it while using the HTTPS url. Where else am I to change it? Velvet Blues Update URLs didn’t help either.

    Are their files I should be manually editing?

    #869678
    Tom
    Lead Developer
    Lead Developer

    Which URL is the one you’ll be using permanently? Are you sure you used the correct URL when using the search/replace in the plugin?

    #869893
    Steig

    The permanent URL is the https://HEA……org URL. I just reran the plugin again and the problem still exists.

    #869965
    Tom
    Lead Developer
    Lead Developer

    What happens if you remove/re-add the logo in Customize > Site Identity?

    #869970
    Steig

    I did that and it didn’t change anything. Somehow, some wordpress file has the original non-SSL based URL recorded in it and it’s just not changing/updating either with removing the file and re-adding it, with the URL change in settings/general, and with the Velvet Blues plugin.

    Is there a php file that can be manually edited?

    #869976
    Tom
    Lead Developer
    Lead Developer

    There is, but it’s likely better to fix the underlying issue.

    Does the URL in Settings > General have https? The uploaded image should use the URL set in there.

    #869977
    Steig

    Yes the wordpress address and site address are both the same and both have the https:// url in them.

    #870704
    Tom
    Lead Developer
    Lead Developer

    Hmm, something isn’t right then. What if you:

    1. Remove the logo from the Customizer and save.
    2. Delete the logo from your Media Library.
    3. Re-upload the logo in the Customizer.

    You could also try uploading it with a different filename in case something is cached. The WP Media Library will always use the protocol set in “Settings > General”.

    #870969
    Steig

    I’ve followed these steps and also renamed the file prior to loading it back into the media tab. No luck. In fact now, while in the customerize immediately after uploading the newly named logo, it properly renders it in that left hand column, but on the right where the website is previewed, it just shows as a broken link.

    #870997
    Tom
    Lead Developer
    Lead Developer

    Any chance you can send me temporary admin login details so I can take a closer look?: https://generatepress.com/contact

    If so, please be sure to mention this topic.

    Thanks!

    #871032
    Steig

    I just emailed it in via your pre-sales contact form.

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.