After enabling WP-Discourse plugin, I found comments from Discourse caused my WP site mix-content problem: All the avatars were loaded through HTTP instead of HTTPS.
I tried to fix it myself. And after reading the WP-discourse plugin code, I found the HTTP image URLs are stored in wp_postmeta with meta_key discourse_comments_raw. And this value is got from https://my.discourse.site/t/topic/20/wordpress.json
I found this JSON file responded with HTTP images URLs instead of HTTPS. But my whole Discourse site is transferred through HTTPS.(Though I noticed that it also sometimes get mix-content problem too)
The possible reason for this is that I used HTTP from the very beginning and later changed to HTTPS and some settings seems not changedâŚ
It seems that the image URLs returned from your Discourse forum are http. Iâll see if thereâs anything that can be done on the WordPress end to deal with that.
The problem fixed after I enabling force HTTPS in Discourse. Add an option on the WordPress end will be good though.
BTW, even if my post published to Discourse only has a link (followed instruction on WP Discourse template customization). There is still a âshow full postâ button under the Onebox. And if I click it the link will expand to a full article in plain text. This is not good. Iâm a freshman to Discourse. Is this how Discourse treat external links?
You can remove this on Discourse by unselecting the âembed truncateâ setting. There is a description of how to do this in the WP Discourse inline documentation. Itâs found on the Publishing tab in the description for the Use Full Post Content setting.
But I unselected âPublish the full post to Discourse, rather than an excerpt.â in WP-Discourse settings. So I think since WP-Discourse wonât publish the full post to Discourse, Discourse has no full post to show. However the actual result is not like what I think.
Sorry, I was not being clear. That setting will not have an effect on your posts, because you are using a custom template. But, the description of that setting tells you what you need to do to remove the âShow Full Postâ button from Discourse.
Go to your Discourse forum at /admin/site_settings/category/posting and look for the âembed truncateâ setting. Unselect that setting on Discourse.
Another thing I donât understand is: since there is an link account option in user profile page (when Discourse is used as the SSO provider), why user can still edit their Discourse username on that page? Wonât that cause problems?(For example change it to administratorâs username)
If you select the option âDo Not Display Discourse Name Fieldâ on the Publishing tab, the Discourse Username wonât be editable. Unfortunately with that setting, the Discourse Username is not displayed at all. Thatâs something that needs to be fixed.
What I was thinking of doing is just printing the Discourse username to the user preferences page so that it could be seen that itâs set. Would that work?