# 您不再有权访问的主题的书签仍然存在

**URL:** <https://meta.discourse.org/t/bookmarks-still-exist-for-topics-you-no-longer-have-access-to/391822>\
**Category:** UX\
**Tags:** bookmarks\
**Created:** [2025年十二月20日 21:15 UTC](https://meta.discourse.org/t/bookmarks-still-exist-for-topics-you-no-longer-have-access-to/391822 "2025-12-20T21:15:49Z")\
**Posts on this page:** 1\
**Showing post:** 3

<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:** [2025年十二月24日 10:52 UTC](https://meta.discourse.org/t/bookmarks-still-exist-for-topics-you-no-longer-have-access-to/391822/3 "2025-12-24T10:52:46Z")

</div>

干得好 @JammyDodger 👏

这将通过以下链接修复：

> <https://github.com/discourse/discourse/pull/36856>
>
> Previously, \`UserSummary#bookmark\_count\` used a simple \`Bookmark.where(user:).co…unt\` which included bookmarks for content the user could no longer access (e.g., topics moved to private categories, deleted posts, or PMs they were removed from). This caused a mismatch where users saw "4 bookmarks" in their profile stats but an empty bookmark page.
> 
> Added \`BookmarkQuery#count\_all\` that reuses the same access-filtered UNION query as \`list\_all\`, ensuring the count reflects only accessible bookmarks.
> 
> Also refactored \`BookmarkQuery\` for clarity:
> \- Extracted \`build\_list\_queries\` to share query building between \`count\_all\` and \`list\_all\`
> \- Extracted helper methods in \`unread\_notifications\`: \`fetch\_reminder\_notifications\`, \`load\_deleted\_bookmarkables\`, \`can\_see\_notification\_bookmark?\`
> \- Removed verbose comments and debug SQL formatting
> 
> Ref - https://meta.discourse.org/t/391822

---

_[View the full topic](https://meta.discourse.org/t/bookmarks-still-exist-for-topics-you-no-longer-have-access-to/391822)._
