# Bug in docs plugin: Pinned topics are not at the top

**URL:** <https://meta.discourse.org/t/bug-in-docs-plugin-pinned-topics-are-not-at-the-top/220254>\
**Category:** Bug\
**Tags:** docs, size-m\
**Created:** [March 7, 2022, 9:03am UTC](https://meta.discourse.org/t/bug-in-docs-plugin-pinned-topics-are-not-at-the-top/220254 "2022-03-07T09:03:05Z")\
**Posts on this page:** 1\
**Showing post:** 10

<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:** [April 28, 2022, 2:21am UTC](https://meta.discourse.org/t/bug-in-docs-plugin-pinned-topics-are-not-at-the-top/220254/10 "2022-04-28T02:21:41Z")

</div>

Sadly this is quite a major change to both core and the plugin.

Tough we use TopicQuery to get the lists of topics, we handle all ordering outside of TopicQuery in:

> <https://github.com/discourse/discourse-docs/blob/main/lib/docs/query.rb#L22>

To complete this we would probably need to move it so “core” handles ordering here instead of the plugin doing its own thing. It is a very complex change.

On the upside we can potentially remove a bunch of code from the plugin.

Sorry but I got to put this bug on the backburner for now.

---

_[View the full topic](https://meta.discourse.org/t/bug-in-docs-plugin-pinned-topics-are-not-at-the-top/220254)._
