Not valid SSL certificate WP discourse

AI-generated summary

The user Jeroen_Van_Der_Mark reports an issue with the WP Discourse plugin where profile pictures load via HTTP instead of HTTPS, causing SSL certificate errors. Both the WordPress and Discourse sites are using HTTPS, and the Discourse URL is correctly set to https://forum.fit.nl. The issue appears to be related to cached data from Discourse, which may not be updating to use HTTPS for avatar URLs. simon suggests that a webhook for syncing comments might be causing the cached data to retain HTTP links. After troubleshooting, Jeroen_Van_Der_Mark confirms the issue is resolved, thanking simon and pfaffman for their help.

Hi! We are running the WP discourse plugin. Great integration btw! Thanks for that.

One small problem pops up: it loads the profile picture as http instead of https. (see: FIT.nl - Alles over krachttraining, voeding en leefstijl)
This leads to an incorrect SSL-certificate. Is there a known fix for this?

Thanks in advance :blue_heart:

Are both sites https? Is force https enabled on the discourse side?

Ah perfect, thanks for your answer! I forced it now in https (option was off). Still a http result, maybe cache?

Both sides are https :slight_smile:

https://forum.fit.nl & FIT.nl - Alles over krachttraining, voeding en leefstijl

Do you have the https URL set in the Discourse URL option on WordPress? It is used for converting any relative URLs that are returned from Discourse to Absolute URLs.

Thanks Simon! Yes i have the |Discourse URL| → https://forum.fit.nl

I checked and when I look at an avatar on the WP side, I get an https link to the discourse avatar.

That’s correct :slight_smile:
But the image is still http source instead of https.

Oh. You’re right. I swear that I’d seen an avatar/profile image as https, but now I’m seeing http.

The src attribute for the avatars is set by the data that’s returned by Discourse. If you have setup a webhook for syncing comments between Discourse and WordPress, you will be getting comment data that has been cached on WordPress until a new comment is added to a topic. Hopefully that’s the problem. Let us know if this doesn’t get resolved.

It works :slight_smile:

Thanks @simon & @pfaffman for the great help :blue_heart: