# Topic list sorting bug

**URL:** https://meta.discourse.org/t/topic-list-sorting-bug/154236
**Category:** Bug
**Created:** [June 8, 2020, 9:19pm UTC](https://meta.discourse.org/t/topic-list-sorting-bug/154236 "2020-06-08T21:19:16Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [June 8, 2020, 9:19pm UTC](https://meta.discourse.org/t/topic-list-sorting-bug/154236/1 "2020-06-08T21:19:16Z")

</div>

@j.jaffeux I’ve uncovered a new bug which is likely related to this fix

> [@Topic List Sort By stuck on false](https://meta.discourse.org/t/topic-list-sort-by-stuck-on-false/154042/6):
>
> Strange, it was not. I needed to rebuild so I did a git pull, does this not work the same as doing it through the docker manager gui? Either way, it’s working now, thank you very much!

The previous fix did fix the sorting problem, but now when you visit a topic and then go back to the category, the sorting goes back to latest rather than following the category settings.

For example visit [this category](https://community.naturephotographers.network/c/image-showcase) which is set to ‘Created’ and ‘Descending’, note the order of items, visit one of the topics and then go back, note the sorting has changed. If I refresh the page it will go back to the correct sorting.

Before visiting a topic:

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/1/418450a1c43e53e9cd46ae90689379264be3bc7f.jpeg)

After visiting a topic:

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/7/77e48b22af5dc9e7d4af7537f7359a05e5665a30.jpeg)

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [June 18, 2020, 7:18pm UTC](https://meta.discourse.org/t/topic-list-sorting-bug/154236/4 "2020-06-18T19:18:47Z")

</div>

Can anyone replicate this? I can’t tell if it happens on meta since I don’t think any categories are sorted by created date. It’s annoying my users greatly 😄

---

<div class="post-metadata">

### Author: ![justin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/justin/32/157614_2.png) [@justin](https://meta.discourse.org/u/justin)
#### Post date: [June 18, 2020, 7:20pm UTC](https://meta.discourse.org/t/topic-list-sorting-bug/154236/5 "2020-06-18T19:20:53Z")

</div>

David – sorry for the delay. Engineering is looking at this but it’s a bit tricky to navigate through. It may have to wait until after our upcoming release of 2.5 depending on complexity.

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 19, 2020, 7:43am UTC](https://meta.discourse.org/t/topic-list-sorting-bug/154236/7 "2020-06-19T07:43:53Z")

</div>

Yes I can replicate this, It’s a little bit tricky, I have already spent some time digging it, will spend more time next week.

---

<div class="post-metadata">

### Author: ![tpetrov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tpetrov/32/164643_2.png) [@tpetrov](https://meta.discourse.org/u/tpetrov)
#### Post date: [June 19, 2020, 7:58am UTC](https://meta.discourse.org/t/topic-list-sorting-bug/154236/8 "2020-06-19T07:58:10Z")

</div>

We have something similar.  
Our news category is set to sort by create date. It works if you access it directly via the url [News - Software AG Tech Community](https://tech.forums.softwareag.com/c/news/7)  
But not if you first visit the home page and then select news from the “sections” dropdown.

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [July 3, 2020, 11:29pm UTC](https://meta.discourse.org/t/topic-list-sorting-bug/154236/9 "2020-07-03T23:29:42Z")

</div>

Any updates on this?

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [July 4, 2020, 10:10am UTC](https://meta.discourse.org/t/topic-list-sorting-bug/154236/10 "2020-07-04T10:10:23Z")

</div>

Yes, I think that will fix it (once merged)

[https://github.com/discourse/discourse/pull/10165](https://github.com/discourse/discourse/pull/10165)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [July 6, 2020, 8:04pm UTC](https://meta.discourse.org/t/topic-list-sorting-bug/154236/11 "2020-07-06T20:04:28Z")

</div>


