PNG's a no show

Unless you can repro the binary image issue here, I am not sure how much we can help.

Ok, since you know more about Discourse than I do, could you suggest points along the process where this problem might occur? If you don’t mind, could you walk through the process with me:

  1. File upload/storage: The files are uploaded properly, they exist and there are no errors in the files, they can be accessed manually, etc.
  2. File retrieval: Which Discourse processes retrieve these files? Which log settings could issue error messages about image file retrieval?
  3. File display: Which Discourse processes display the files? Which log settings could issue error messages about image file display?
1 Like

I think before any of this, can you confirm you are using our official installer? Are you using s3 uploads or standard uploads? Have you ran:

cd /var/discourse
git pull
./launcher rebuild app
3 Likes

Hi @sam, thanks for the suggestion, last night I updated last week’s release via terminal window (cd /var/discourse, git pull, .launcher rebuild app) and the problem still exists. We don’t use Amazon s3 storage.

I don’t have any explanations for your problem, but note that you can paste images directly into the composer. You don’t need to first paste into some other application to create and image to then upload.

Got the message that docker version not supported
Installed docker-ce, now is my forum gone?

After running the latest Discourse update a few days ago, clicking the the download icon opens .txt files in a browser instead of downloading them, yet no Discourse settings were changed. Yet now .png files are displaying properly. So a deeper problem is occuring.

I implemented the Discourse/Docker periodic manual full update instructions and watched error messages.

All updates .launcher rebuild app I received an error message that docker 17.05 is not supported, minimum required is 17.06.02. Ubuntu has changed the package name from docker-engine to docker-ce. Is it safe to install docker-ce, as this won’t be an upgrade? Because of the docker version preventing app rebuild, my forum is down. :frowning: What do?

Yes docker ce is what you want to use

4 Likes

Hi @Sam,
Yeah I installed docker-ce, per How Do I upgrade Docker - Ask Ubuntu and https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04

Then ran .launcher rebuild app, which initiated a download of the base Discourse image.
I stopped it, figured this would wipe out my forum files.
Should I let this run?

I see a big black square in both the browser and inkscape which matches the source:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" id="svg4206" version="1.1" inkscape:version="0.91 r" width="500" height="377.5" viewBox="0 0 500 377.5" sodipodi:docname="Logo-400.svg">

  <defs id="defs4210"/>

  <g id="g4218">
    <rect y="-53.42" x="-40.32" height="466.8" width="589.4" id="rect4216" style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:3.6222;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate"/>

  </g>
</svg>

I don’t actually see an image in this file, just a white background. if you still have the original can you check to see if the contents have changed? I see:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="320.9mm" height="352.2mm" viewBox="0 0 320.9 352.2" version="1.1" id="svg8" inkscape:version="0.92.2 (unknown)" sodipodi:docname="FTB_EpicMode.svg">
  <defs id="defs2"/>


  <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(44.79,25)">

    <rect style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.3;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.265;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;enable-background:accumulate" id="rect944" width="321" height="352.2" x="-44.79" y="-25"/>
  </g>
</svg>
2 Likes

Yes. Your forum files are safe in /var/discourse/shared/standalone.

It is best not to muddy the waters even further at this point. Svg gets downgraded a lot if the text content is on our unsafe blacklists. Focus on pngs first.

2 Likes

Thanks @Jay!   

SVG images are run through an XML whitelist, any non-approved elements are removed.

5 Likes

What Jay said above – yes it’s absolutely safe.

If you wanted a detailed explanation: The Docker image hosts the software (ruby, the code, postgres, etc) that your forum runs on. Discourse stores your data outside the image, so these images are safe to be shut down and upgraded when there’s a new version out. Your data (forum posts, users, site settings) will be restored when it restarts, and that will be mounted onto the new base image.

3 Likes

ok the forum’s back, the latest Discourse & Docker versions are installed.

But we’re still getting the new improved problem, where .pngs are visible yet trying to download .txt files (and other non-image files) to be displayed in a browser - we’re not getting the download/save window dialog (This change happened when the latest Discourse update was installed a few days ago). See this post on our forum:
https://forum.valentina-project.org/t/test-downloads-val-vit-txt-pdf

File sharing is really important in providing support to our user community.
Any thoughts on what could cause this?

OK after all that…we still have the problem that attachments are acting weird.

  1. pngs weren’t displaying

  2. After this week’s update the .pngs are displaying properly. But now downloads don’t work. Text files are opened in a browser tab like they’re an image file.

This is a known bug. Spoke with engineering and it is believed to be the same issue as Upload file name not kept on download.

2 Likes

Thanks @joshua. But How can this be a bug if .zip & .pdf files are downloaded correctly, but others aren’t? The download and display functions are working, the choice of whether to download or display the selected file is what’s a bit muddled.

Is there some method in the code which selects how to process each file type when the download icon is selected?
Can I get to it and make a custom change for our pattern & measurement & text files?

This post has links to each type of file, good for testing:
https://forum.valentina-project.org/t/how-to-make-sleeve-cap/1972/26

Your Discourse is a month old. Can you update to latest? Your downloading issues should be fixed.

2 Likes

Sorry for the delay, it was a Rails 5.x upgrade issue that took a while to work out.

1 Like