# Edit of rebaked post doesn't show in HTML; only in raw

**URL:** https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815
**Category:** Bug
**Created:** [28 בספטמבר,‏ 2015,‏ 4:53am UTC](https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815 "2015-09-28T04:53:23Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![dandv](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dandv/32/169779_2.png) [@dandv](https://meta.discourse.org/u/dandv)
#### Post date: [28 בספטמבר,‏ 2015,‏ 4:53am UTC](https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815/1 "2015-09-28T04:53:24Z")

</div>

I’ve just run into a very odd issue. I’ve edited [this post](http://discourse.quantifiedselfforum.com/t/zeo-sleep-monitor/1055) as an admin, and after saving, none of my changes show up in the HTML!

 ![](https://global.discourse-cdn.com/meta/original/3X/2/9/290cb8f77651ae02edb3456b47123cf3104338d2.gif)

The HTML diff doesn’t show any difference. The markdown/raw diff correctly shows the changes (as does the [raw post](http://discourse.quantifiedselfforum.com/raw/1055)), but they aren’t rendered in the post itself. Needless to say, I’ve reloaded the page a bunch of times, but Discourse still shows the previous revision (#2) of the post, which was created by the rebake task - maybe this is the culprit?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [28 בספטמבר,‏ 2015,‏ 10:08am UTC](https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815/2 "2015-09-28T10:08:18Z")

</div>

This is very odd indeed. Are there anything in `/logs` regarding this post? Does it fix it when you “`Rebuild the html`”?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [28 בספטמבר,‏ 2015,‏ 10:10am UTC](https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815/3 "2015-09-28T10:10:21Z")

</div>

I still kind of feel cooked post processor should rebake raw, there are weird timing issues with edit

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [28 בספטמבר,‏ 2015,‏ 10:12am UTC](https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815/4 "2015-09-28T10:12:58Z")

</div>

Yup, I agree. I have it on today’s TODO list to test and make sure it doesn’t break anything.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [28 בספטמבר,‏ 2015,‏ 10:13am UTC](https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815/5 "2015-09-28T10:13:16Z")

</div>

Yeah we’ve definitely seen weird issues here with editing and having to rebake. If you can nail down a consistent repro that’d be awesome.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [28 בספטמבר,‏ 2015,‏ 9:27pm UTC](https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815/6 "2015-09-28T21:27:14Z")

</div>

I know exactly how this happens:

“cooked post processor” is our process that downloads images from posts, runs slow oneboxes and so on. It only looks at “cooked HTML”

1. In one process… cooked post processor is running (in sidekiq) this takes a while to run
2. In another process an edit happens, this produces new “cooked”
3. The process (1) finishes and overwrites “cooked” produced in (2)
4. Edit process kicks off “cooked post processor” it uses “cooked” produced by step (3)

End result is that edit happens but cooked is not updated.

The correct solution here is to make sure that cooked post processor always rebakes markdown.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [28 בספטמבר,‏ 2015,‏ 10:05pm UTC](https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815/7 "2015-09-28T22:05:21Z")

</div>

Awesome, this weird little bug has been a thorn in our side for a while. Love to see it fixed!

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [29 בספטמבר,‏ 2015,‏ 4:51pm UTC](https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815/8 "2015-09-29T16:51:58Z")

</div>

Here’s the fix 🎉

[https://github.com/discourse/discourse/commit/54d6d24cbfe4254407415b48fad1b3660208b48a](https://github.com/discourse/discourse/commit/54d6d24cbfe4254407415b48fad1b3660208b48a)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [29 בספטמבר,‏ 2015,‏ 4:52pm UTC](https://meta.discourse.org/t/edit-of-rebaked-post-doesnt-show-in-html-only-in-raw/33815/9 "2015-09-29T16:52:01Z")

</div>


