Site logo

Archived topic

non SSL references on SSL website

15 replies · Started by Steig on April 13, 2019

Viewing posts 1–15 of 16

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?

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?

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?

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?

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?

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

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

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?

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.

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

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".

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.

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!

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

This archived topic is closed to new replies.