# Disappearing bookmarks and expected behavior of /bookmarks

**URL:** https://meta.discourse.org/t/disappearing-bookmarks-and-expected-behavior-of-bookmarks/264670
**Category:** Bug
**Tags:** bookmarks
**Created:** [May 11, 2023, 3:49pm UTC](https://meta.discourse.org/t/disappearing-bookmarks-and-expected-behavior-of-bookmarks/264670 "2023-05-11T15:49:24Z")
**Posts on this page:** 5
**Page:** 2

<div class="post-metadata">

### Author: ![mentalstring](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mentalstring/32/168934_2.png) [@mentalstring](https://meta.discourse.org/u/mentalstring)
#### Post date: [November 3, 2023, 8:34am UTC](https://meta.discourse.org/t/disappearing-bookmarks-and-expected-behavior-of-bookmarks/264670/38 "2023-11-03T08:34:31Z")

</div>

Great news!

> [@martin](#):
>
> - Bookmark a topic and don’t bookmark any posts within
> - Delete or recover any post in the topic

This can explain the seemingly random nature of it.

> [@martin](#):
>
> It is caused by this job (added by me years ago) which doesn’t take into account Topic-level bookmarks:
> 
> [discourse/app/jobs/regular/sync\_topic\_user\_bookmarked.rb at 4346512f88ebf3fa4aa0cd6a68d98781fe70423d · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/4346512f88ebf3fa4aa0cd6a68d98781fe70423d/app/jobs/regular/sync_topic_user_bookmarked.rb)

I think this roughly matches our timeline of when we started seeing it which was when we updated in March this year to 3.0, which had been released in January. So, it reached us then, even though the commit was done in ~May 2022.

> [@martin](#):
>
> So, a fix is on the way along with a data migration to correct existing records. I will post here again when I have it merged.

I’m aware that this is not the policy in place… but, given how broken the feature is at the moment, any chance this may be backported to stable too? Otherwise we’ll be months away from getting the fix. We’ll keep our fingers, toes (and eyes) crossed that this is possible.

Thank you for looking into this!

---

<div class="post-metadata">

### Author: ![mcwumbly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcwumbly/32/103861_2.png) [@mcwumbly](https://meta.discourse.org/u/mcwumbly)
#### Post date: [November 3, 2023, 11:42pm UTC](https://meta.discourse.org/t/disappearing-bookmarks-and-expected-behavior-of-bookmarks/264670/39 "2023-11-03T23:42:21Z")

</div>

If you’re tracking stable then I think you’ll have to wait. Making exceptions is a can of worms, unfortunately.

On the plus side, we plan to continue making stable releases regularly on a 6 month cadence, so you should expect it to be available at the end of January / early February.

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [November 7, 2023, 3:44am UTC](https://meta.discourse.org/t/disappearing-bookmarks-and-expected-behavior-of-bookmarks/264670/45 "2023-11-07T03:44:45Z")

</div>

Fix has been merged now:

> <https://github.com/discourse/discourse/pull/24226>
>
> This commit fixes an issue where when some actions were done
> (deleting/recoveri…ng post, moving posts) we updated the
> topic\_users.bookmarked column to the wrong value. This was happening
> because the SyncTopicUserBookmarked job was not taking into account
> Topic level bookmarks, so if there was a Topic bookmark and no
> Post bookmarks for a user in the topic, they would have
> topic\_users.bookmarked set to false, which meant the bookmark would
> no longer show in the /bookmarks list.
> 
> To reproduce before the fix:
> 
> \* Bookmark a topic and don’t bookmark any posts within
> \* Delete or recover any post in the topic
> 
> c.f. https://meta.discourse.org/t/disappearing-bookmarks-and-expected-behavior-of-bookmarks/264670/36

---

<div class="post-metadata">

### Author: ![mentalstring](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mentalstring/32/168934_2.png) [@mentalstring](https://meta.discourse.org/u/mentalstring)
#### Post date: [November 7, 2023, 12:20pm UTC](https://meta.discourse.org/t/disappearing-bookmarks-and-expected-behavior-of-bookmarks/264670/46 "2023-11-07T12:20:04Z")

</div>

Thank you for the fix for this. 👍 This will have a big impact in our community which relies heavily on `/bookmarks` to keep track of their favourite topics and has been going through quite a bit of frustration.

I understand the reasons this won’t be backported into stable… so we’ll only really test this early next year then.

Have to admit it’s been a little puzzling to me how it’s been broken for this long and nobody else seem to have spotted it (or at least reported it). My best guess is that `/bookmarks` not being a default entry on the top menu (these days?) makes it less used than it could which is a shame because for some scenarios, it’s a super useful browsing pattern to have available. But, given that this also affects the upcoming `/filter` feature, I hope this also helped other people too.

Thanks again!

---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [November 11, 2023, 12:00am UTC](https://meta.discourse.org/t/disappearing-bookmarks-and-expected-behavior-of-bookmarks/264670/47 "2023-11-11T00:00:35Z")

</div>

This topic was automatically closed after 3 days. New replies are no longer allowed.

[Previous page](https://meta.discourse.org/t/disappearing-bookmarks-and-expected-behavior-of-bookmarks/264670.md?page=1)
