Pasted images showing in preview, not in posted/updated

I’m using discourse for my local computer & electronics club and I’m writing a howto document on a process that’s important and people often stuff up. So discourse is the perfect tool for the job.

I’ve been using Hide Details function to help the document not become too unwieldy for users and I’ve been using lots of screenshots.

The screenshots show in the preview just fine. They are also all behind the Hide Details features

Preview screenshot

When I view the post in it’s normal way, the screenshots don’t display.

Normal Screenshot

Our forum is a self hosted 16.04 system per the discourse basic install instructions, we’re running:

v2.2.0.beta3 +111

Any suggestions?

You cannot repro the problem here? I am not following because your post above looks fine to me? I see screenshots behind both [details] sections?

2 Likes

I’m not sure how to reproduce the problem. And it seems like it’s intermittent :rage:

Since writing the post I did some more work on the documentation, and I’m seeing some more of the same behaviour.

I can always redo the screenshots, but I thought it worthwhile posting here incase there is anything I should be trying or if there are any logfiles worth looking at in the event it’s a bug.

If I save my post update shortly(like a few seconds) after the upload, does that cut off some sort of important process which could lead to this behaviour? I’m on a 20mbps internet connection to the forum server, so maybe this is something that wouldn’t happen over a LAN?

One guess I have here is that you may be having issues with your job scheduler, first things first, did you look at logs. Where are all the Discourse logs

1 Like

Thanks for the suggestion, I looked at the following places and couldn’t find anything that seemed related.

  • /logs
    • no errors apart from an initial certificate error when I was getting let’s encrypt setup
  • app:/shared/log/rails/production.log
    • I got a bit lost in this file, are there any keywords I should look for?
    • when I executed cat production.log | grep error I saw the URLs for the “missing” images, they are valid and I can paste them into my browser and they will display properly
  • app:/shared/log/rails/production_errors.log
    • empty file

I looked at the source in Firefox and tried to see any differences between working and non working images. I can’t tell why one lightbox-wrapper is working and another isn’t. This issue also happens in Chromium. I’m not exactly sure what kind of source code differences to be looking for, but perhaps there is a clue in here if anyone had any suggestions on what I should search for?

I also noticed something interesting with the Hide Details features

Broken
  • Here is a list item with the image pasted immediately on the next line
    image
  • Here’s another but with a link to the Ubuntu Website
    image
Working
  • Here is a list item with the image pasted after a blank line.

image

  • On my system, adding the blank line between a list item that had a URL in it would allow the image to display. Ubuntu Website

image

The above produces a different result on my system with the text I wrote originally, but strangely, if I paste the above sample text in verbatim, I don’t have the invisible image issue.

1 Like

Can you share the raw of your post?

The first 2 images aren’t displaying, and the second 2 are

image issue.txt (2.9 KB)

That’s the “cooked” version. I want what you entered in the composer (the “raw” version) :wink:

Here you go, before it went into the oven :wink:

image issue2.txt (1.7 KB)

@zogstrip just following up if you need anything else from me? Should I just work around this issue at this stage?

1 Like