[Solved] Posts appearing blank in 1.0


(Silver Quettier) #1

Continuing the discussion from Posts sometimes randomly not displaying:

Solution:

The treatement comes in two parts:

  1. A fix was commited. You need to update to prevent this behavior from happening again.
  2. Already affected posts must be rebaked.

How to do it through the UI:

  1. Go to your.discourse.url/admin/upgrade/ . Update everything.
  2. For every previously affected post, make a minor edit. (Simply pressing the edit button and validating the post without changes will not work.)

How to do it through the console:

  1. Go to /var/discourse/ . Perform a git pull to update then ./launcher rebuild app to rebuild.
  2. Enter the container with ./launcher ssh app then rebake all posts with rake posts:rebake.

Original post:

So, this has started on my Discourse instance as well:

Same as the other topic (would have replied there if not closed), posts (and PMs!) from various users shows blank with no discernible pattern, but their content is there. (Editor shows it.)

I may have a repro for the first post that triggered this. It all started right after a post in which I used backticks to escape text starting by a pound without Markdown turning it into a title. Yes, I wanted to write a hashtag. hangs head in shame
I fail to see how it would spread to other posts, however. I will try to reproduce here (in a reply to this post, for obvious reasons).


Posts showing up blank
(Sam Saffron) #3

I fixed this issue today (I think), update to latest, is it still happening?


(Silver Quettier) #4

I will have access to the server hosting the Discourse in roughly 10 hours (can’t SSH to it from where I am).

I will run

git pull
./launcher rebuild app

and keep you posted.


(Sam Saffron) #5

you can just update from /admin/upgrade web UI.


(Silver Quettier) #6

This is convenient.

So, I just updated both Discourse and Docker-manager through the web-UI. I don’t know if the problem will happen again on new posts. It has, however, done nothing for the previously affected posts.
Is there rebaking to do?


(Sam Saffron) #7

yes you need shell access for that.

./launcher ssh app
rake posts:rebake

Easiest thing to do though is just to edit the posts that had problems.


(Jeff Atwood) #8

We eventually need a rebake option on the admin wrench button under the post I think.


(PJH) #9

May I also suggest - if it’s not going to be too stressful on the server - , somewhere in admin, Rebake all posts made in the past X hours (X ∈ {1,2,4,8,12,24,48} or whatever)


(Silver Quettier) #10

Thank you @sam, after updating, no problem appeared in the next 22 hours… and counting. As your said, rebaking the affected posts corrected them.

I updated the first post to allow users who might not have updated since 1.0 to find the solution quickly.


(Sam Saffron) #11