# Edits not properly reset with Shared Drafts

**URL:** https://meta.discourse.org/t/edits-not-properly-reset-with-shared-drafts/83887
**Category:** Bug
**Created:** [March 26, 2018, 5:58pm UTC](https://meta.discourse.org/t/edits-not-properly-reset-with-shared-drafts/83887 "2018-03-26T17:58:01Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [March 26, 2018, 5:58pm UTC](https://meta.discourse.org/t/edits-not-properly-reset-with-shared-drafts/83887/1 "2018-03-26T17:58:01Z")

</div>

Used the new Shared Drafts feature when writing up [Discourse 2.0.0.beta5 Release Notes](https://meta.discourse.org/t/discourse-2-0-0-beta5-release-notes/83881) today. Prior to publishing the topic I made 2 edits. After publishing the topic I made another edit, which I then hid via “hide revision”.

**Expected Results:**

Anonymous viewer: no edits seen.  
Non-staff user: no edits seen.  
Staff user: 1 edit seen (but hidden).

**Actual Results:**

❌ Anonymous viewer: 3 edits seen. Blank edit history modal.  
❌ Non-staff user: 3 edits seen. Blank edit history modal.  
✅ Staff user: 1 edit seen (but hidden)

* * *

**Anon/logged in user view:**

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/7/c7ad0cdbdea4fd4c7466fa319b602732f97ad398.png)

 ![image](https://global.discourse-cdn.com/meta/original/3X/d/6/d6f21c6b9621f44ae362ea73673520eccac68c91.png)

cc @eviltrout

An aside (maybe a bug?) - the grace edit window didn’t seem to apply after publishing. The post publishing edit was made with 10 seconds of publishing the posts, and changed less characters than the `editing grace period max diff high trust` (400). I’d expect it to be a grace edit and thus not logged?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [March 26, 2018, 7:47pm UTC](https://meta.discourse.org/t/edits-not-properly-reset-with-shared-drafts/83887/2 "2018-03-26T19:47:37Z")

</div>

Fixed here. I didn’t realize there’s a `public_version` that’s separate from the `private_version`:

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

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [March 26, 2018, 7:47pm UTC](https://meta.discourse.org/t/edits-not-properly-reset-with-shared-drafts/83887/3 "2018-03-26T19:47:43Z")

</div>



---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [March 26, 2018, 8:07pm UTC](https://meta.discourse.org/t/edits-not-properly-reset-with-shared-drafts/83887/4 "2018-03-26T20:07:08Z")

</div>

Also, this should fix the ninja editing:

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