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

Whenever a topic is pinned in a category, it’s not pinned to the top in docs

You can see the behaviour in action here: https://forum.cannabisanbauen.net/docs?tags=01-grundlagen
Is that expected behaviour or a bug?

Discourse version: 2.8.1
Docs plugin version: 0.1

1 Like

I just tried testing this with Discourse version 2.9.0.beta2 and was unable to reproduce the issue. A pinned topic in a category included in Docs appears to be pinned successfully on the docs page, as expected.

This issue might just be related to Discourse version: 2.8.1, and you could try updating Discourse to resolve this.

Docs plugin version: 0.1

2 Likes

I can reproduce this with 2.9.0.beta3. The docs index appears to default to recent activity, and doesn’t sort by pinned status; it does, however, show the correct pinned status by icon.

I pinned the first doc I created, hence it is the “oldest”:

I updated the pinned doc, making it the more recent activity:

And added a new doc, which then becomes the most recent:


I changed the pinned status on the topic (meaning the discussion, the “docs view” does not show the pinned status).

Screenshot from 2022-04-05 13-56-16

And it updated on the docs index:

Screenshot 2022-04-05 at 14-09-18 Docs - Sandbox Discourse Kit


Notes:

  • I tried a category and global pin: same results
  • Any activity bumps the doc in the index: the more recently discussed topics will be at the top
3 Likes

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:

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.

3 Likes

it seems, this issue still persists? We just tested on 3.2 and latest docs plugin version. Pinned topics are not displayed at the top in docs.

Has anyone been able to find a solution or workaround?