Support Forum

Attachments called as unsecure content

RI rickandersonaia
rickandersonaia
Member

I upgraded my site to PHP7 and SSL this weekend – since then I’ve had a number of odd problems on the site.

In particular attachments that are uploaded to the forum via the attachment upload system are being called via http rather than https – https://www.byobwebsite.com/forum/start-building-your-website-here/how-to-put-a-different-big-imge-at-the-top-of-pages/

Here is the error I see in my Chrome console

Mixed Content: The page at ‘https://www.byobwebsite.com/forum/start-building-your-website-here/how-to-put-a-different-big-imge-at-the-top-of-pages/’ was loaded over HTTPS, but requested an insecure image ‘http://www.byobwebsite.com/wp-content/forum-image-uploads/rick-anderson/2017/01/2017-01-11_9-16-40.png’. This content should also be served over HTTPS.

I have updated the forum permalink 

2017-01-17_7-29-31.png

11 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

It appears that the posts save away the complete image url – which makes sense from a performance point of view.

But that is odd as we often talk to users who have done what you have done but we have never had this specific report before.

Can you tell me what your settings are for displaying image content – specifically if you are using image enlargement?

MP Mr Papa
Mr Papa
Member

yes, that its it, but not exactly sure where @yellow-swordfish was going…

agree its odd since we have quite a large number of users on ssl without similar issue or warning…  I will have to see if my ssl tes site is still working and try to take a look…

YS Yellow Swordfish
Yellow Swordfish
Member

While @mr-papa looks at the SSL side as stated above, I will look at those settings to see if they by any chance, bypass some of the filtering code.

RI rickandersonaia
rickandersonaia
Member

You can still see it here – https://www.byobwebsite.com/forum/start-building-your-website-here/inserting-3-feature-box-images-in-agility-v-3-1-0-1/#p32076

Mixed Content: The page at ‘https://www.byobwebsite.com/forum/start-building-your-website-here/inserting-3-feature-box-images-in-agility-v-3-1-0-1/#p32076’ was loaded over HTTPS, but requested an insecure image ‘http://www.byobwebsite.com/wp-content/forum-image-uploads/rick-anderson/2017/01/2017-01-07_9-18-42.png’. This content should also be served over HTTPS.

YS Yellow Swordfish
Yellow Swordfish
Member

First up I do not see any images in that post – that may, I assume, be a permissions thing.

If i load the image link in your post above directly into the browser then I do see it but it doesn’t seem to care whether I use http or https. They both deliver the requested image and either way I get no errors or warnings showing up in my browser console.

I assume your post here is to demonstrate that images are still be saved as http even though they should not be now. The first question then becomes how – exactly – did you change your website to https?

RI rickandersonaia
rickandersonaia
Member

The post really demonstrates that the images are being “called” as http – rather than being “saved” as http.

Process for switching to ssl? – I suppose the typical commercial process.

  1. Move the site to a new server with dedicated ip address
  2. Chang the DNS to the new ip address
  3. Buy the cert from the host
  4. Host installs the cert
  5. I manually change the site url & blog url in Settings >> General
  6. I update the permalinks in the forum settings
  7. I search and replace ever instance of http://www.byobwebsite to https://www.byobwebsite using the “Better Search and Replace” plugin
  8. I go looking for static resources that are saved or referenced under the old url – in CSS files and custom php

I’m not using any “force SSL” plugins or anything other than WordPress native ability to handle ssl.

RI rickandersonaia
rickandersonaia
Member

If I delete and reinstall simple:press will the database entries be deleted?

RI rickandersonaia
rickandersonaia
Member

OK, so I uninstalled and reinstalled simple:press – none of my issues have gone away.  I didn’t uninstall and reinstall my sp plugins.

RI rickandersonaia
rickandersonaia
Member

OK, after digging into this further it turns out that simple:press stores the full url of the attachment in the post content itself.  So since the images were attached when the site was http – the src is http.

I solved this by doing a search and replace on the _sf tables in the database.  All my forum pages are now fully secure.

YS Yellow Swordfish
Yellow Swordfish
Member

I did say that right at the top of the thread. I have, actually, opened a ticket to get this changed as it really should reflect the current scheme and be prepended when requested.