Broken image in Discourse (but they work in the message preview)


(Coin-coin le Canapin) #1

Hi,
When I publish a WP post to Discourse, the images won’t show up:

But they do show up in the message preview if I edit the topic.

Saving the edit or rebuilding the message HTML don’t fix it.
Typical HTML of such an image is:

<img class="wp-image-157219 size-full aligncenter" src="http://monocycle.info/wp-content/uploads/2018/06/catégories-e1529598284988.png" alt="" width="400" height="364" />

Any idea?

edit: I may have understood why.
The domain monocycle.info has been locally redirected to the server I’m working on, which is where my WordPress is installed. I did the redirection via the hosts windows file.
But Discourse doesn’t have this redirection, so I guess it has to read these images URLs by itself before somewhat delivering them on the message, and so it can’t find these image?
Not 100% sure this is the cause, but since my website will be launched in a few days, I’ll figure out when the domain will be globally redirected to my server.


(Coin-coin le Canapin) #2

Hi,
Unfortunately it was not the problem I guess.
The DNS propagation is down, but the issue remains:

Even for images with the proper markdown syntax (see the very first image link):

The topic:

And the WP post: monocycle.info fait peau neuve - monocycle.info


(Bhanu Sharma) #3

I can be wrong but what I understand here is that images may be loading on a secure site (https) but their links are (http) What I understand from that is the server from where the post is published should be configured to fully support https first.

EDIT: but that doesn’t looks like the case, I visited the site and both WP and Discourse are configured to load over SSL. What needs to be seen is how have you configured Discourse WP plugin.


(Coin-coin le Canapin) #4

On the first message they were indeed in http, but I have updated my website shortly after, so as you can see on the second message, they are in https.

Here’s my WP Discourse configuration:


(Simon Cossar) #5

What happens if you try rebuilding the HTML now?


(Coin-coin le Canapin) #6

Hi,
It doesn’t do anything. :confused:


(Michael Brown) #7

This does appear to have been the case - posting those URLs on that site in a new message works:

https://monocycle.info/wp-content/uploads/2018/06/new-site.png

:arrow_down:


(Coin-coin le Canapin) #8

Hummm since I’m here, I’m a bit puzzled as the topic doesn’t appear in its own category:
Here’s the topic: Monocycle.info fait peau neuve - Actualités - Monocycle.info
Last activity June 19, but I can’t find it here: Actualités - Monocycle.info

:thinking:

How does it doesn’t work on this very topic then? Why rebuild the HTML doesn’t work? :confused:
Maybe it’s a server side cache issue?


(Michael Brown) #9

I see it here:

Strangely it works in a new post: Monocycle.info fait peau neuve - Actualités - Monocycle.info (feel free to delete that after you look)

It should have fixed this - please check the logs (https://forum.monocycle.info/logs) which may show you more details on the error.


(Coin-coin le Canapin) #10

Uh… I don’t have it on my list when I’m logged in:


But it appears when I’m logged out. Any idea why?

When I rebuild the HTML, all the pictures appear a split second before transforming into these broken image icons.

I have no output in the error log.


(Coin-coin le Canapin) #11

Hi again. So, nobody has an idea of what’s happening here?


(Michael Brown) #12

11 posts were split to a new topic: Image downloader should be more resilient and possibly slow down


(Pedro Costa) #14

I recorded my screen.

cc @canapin @supermathie