# Category links should honor category order settings

**URL:** https://meta.discourse.org/t/category-links-should-honor-category-order-settings/274333
**Category:** Bug
**Created:** [August 8, 2023, 11:22am UTC](https://meta.discourse.org/t/category-links-should-honor-category-order-settings/274333 "2023-08-08T11:22:16Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [August 8, 2023, 11:22am UTC](https://meta.discourse.org/t/category-links-should-honor-category-order-settings/274333/1 "2023-08-08T11:22:16Z")

</div>

Continuing the discussion from [Sorting by creation date doesn't work](https://meta.discourse.org/t/sorting-by-creation-date-doesnt-work/274162/10):

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/2/5/625ff4d21b72c4599d5d74feacdd6dee07ae5967.jpeg)

The category/tag links on the homepage/sidebar (class=“subcategory”) load the category using `/latest.json`. It doesn’t appear on the URL, but you can see it in the Network tab:

 ![CleanShot 2023-08-08 at 10.57.10@2x](https://global.discourse-cdn.com/meta/original/4X/2/e/6/2e675e7e6300cf9044ed104754b1f71cfcdd7c1a.png)

This means that the topics in the category will be sorted by latest activity.

If the category has a setting with a different order, it is not honored.  
To see the default order, you have to reload the page. Example: category 25 with order “created descending”:

 ![CleanShot 2023-08-08 at 10.57.57@2x](https://global.discourse-cdn.com/meta/original/4X/8/9/3/8934383edd0b2b2bd836474f3f9cb7619e249c39.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [August 12, 2023, 7:36am UTC](https://meta.discourse.org/t/category-links-should-honor-category-order-settings/274333/4 "2023-08-12T07:36:48Z")

</div>

Just to confirm that we’ve been able to replicate this and we’re looking into it. 👍

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [August 28, 2023, 10:17am UTC](https://meta.discourse.org/t/category-links-should-honor-category-order-settings/274333/5 "2023-08-28T10:17:52Z")

</div>

I think this is fixed now in: 👍

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

---

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [August 29, 2023, 8:45am UTC](https://meta.discourse.org/t/category-links-should-honor-category-order-settings/274333/6 "2023-08-29T08:45:57Z")

</div>

@JammyDodger @david I just upgraded and the issue is still there. To reproduce:

1. Set a category’s default order to “Created Descending”
2. Click on that category’s link on the homepage/sidebar

Expected behavior: topics sorted by descending created date.  
Actual behavior: topics sorted by descending modified date.

1. Reload the page

Expected behavior: topics remain sorted by descending modified date.  
Actual behavior: topics are now correctly sorted by descending created date.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 5, 2023, 8:58pm UTC](https://meta.discourse.org/t/category-links-should-honor-category-order-settings/274333/8 "2023-09-05T20:58:49Z")

</div>

Hi @Nacho_Caballero - I just pushed a second fix which should get things working as expected:

[https://github.com/discourse/discourse/commit/534f62cf5b6796f9e5380aaf9fd7721d75ac096e](https://github.com/discourse/discourse/commit/534f62cf5b6796f9e5380aaf9fd7721d75ac096e)

Please let us know if you’re still seeing any problems after updating.

---

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [September 6, 2023, 7:02am UTC](https://meta.discourse.org/t/category-links-should-honor-category-order-settings/274333/10 "2023-09-06T07:02:35Z")

</div>

Thanks for the great work, David. Now it works perfectly. 👌

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 11, 2023, 7:00am UTC](https://meta.discourse.org/t/category-links-should-honor-category-order-settings/274333/11 "2023-09-11T07:00:30Z")

</div>

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