# Doc Subcategorie - Terug naar forumlus

**URL:** https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513
**Category:** Bug
**Tags:** doc-categories
**Created:** [25 mei 2025 om 06:56 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513 "2025-05-25T06:56:35Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [25 mei 2025 om 06:56 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/1 "2025-05-25T06:56:35Z")

</div>

When a Doc Category has Sub Category that is also setup as a Doc Category. When you click on “Back to Forum” it keeps you in the Doc category sidebar. It doesn’t move up to the parent doc category and will not return to regular sidebar.

This is present here on Meta.

## Steps to reproduce:

- Click on or goto #Documentation
- then click on #Documentation > Using Discourse
- open sidebar and click on “Back to Forum”
- it will bounce between #Documentation & #Documentation > Using Discourse
- only way to get back regular forum/sidebar is to click main site logo.

**Additional**

> [@Heliosurge](#):
>
> This also affects doc sidebar topic links creates the bounce loop as well. Do this commit feature breaks doc categories completely in terms of the sidebar; back to forum

---

<div class="post-metadata">

### Author: ![ondrej](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ondrej/32/198804_2.png) [@ondrej](https://meta.discourse.org/u/ondrej)
#### Post date: [25 mei 2025 om 07:09 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/2 "2025-05-25T07:09:40Z")

</div>

What Dan says is very true 🕵 🐛 🔍

I get this too, nice catch 👏

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [25 mei 2025 om 07:41 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/3 "2025-05-25T07:41:50Z")

</div>

Thanks

Discovered it on my site ti.mi g tedyd passed fully updated ss of today. So tested here

Interesting bug to say the least. Guessing this is a recent change or would have been discovered sooner.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [25 mei 2025 om 08:55 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/4 "2025-05-25T08:55:07Z")

</div>

I think it’s related to [FEATURE: Add `routeHistory` service, SessionStore service and make `back to forum` button go back to previous page by Grubba27 · Pull Request #32260 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/32260)

[https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/sidebar/back-to-forum.gjs#L15](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/sidebar/back-to-forum.gjs#L15)

While storing the last non-admin route URL works well for the admin sidebar, it doesn’t work for the doc sidebar. Both URLs #Documentation and #Documentation > Using Discourse aren’t admin URLs.

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [25 mei 2025 om 12:05 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/5 "2025-05-25T12:05:21Z")

</div>

Definitely not good. Think it is just better instead to use the browser back button for the admin scenario 🤦‍♀️😉

Though they could likely modify that to be specific to admin URLs.

This also affects doc sidebar topic links creates the bounce loop as well. Do this commit feature breaks doc categories completely in terms of the sidebar; back to forum

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [25 mei 2025 om 22:49 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/6 "2025-05-25T22:49:21Z")

</div>

I am also a little confused when I opened the chat in full-screen mode while I was in the admin area and then switched to drawer mode. After that, the back button doesn’t take you anywhere either.

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [25 mei 2025 om 22:57 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/7 "2025-05-25T22:57:02Z")

</div>

Ouch. Seems to be causing a variety of unintended side effects.

---

<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: [26 mei 2025 om 00:07 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/8 "2025-05-26T00:07:44Z")

</div>

Putting a pri-high on this, we will investigate this week.

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [26 mei 2025 om 00:36 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/10 "2025-05-26T00:36:35Z")

</div>

Thank you Sam & the team!

---

<div class="post-metadata">

### Author: ![kris.kotlarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kris.kotlarek/32/176919_2.png) [@kris.kotlarek](https://meta.discourse.org/u/kris.kotlarek)
#### Post date: [26 mei 2025 om 07:17 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/12 "2025-05-26T07:17:24Z")

</div>

Thank you for reporting this. I am starting to work on the fix now 🤞

---

<div class="post-metadata">

### Author: ![kris.kotlarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kris.kotlarek/32/176919_2.png) [@kris.kotlarek](https://meta.discourse.org/u/kris.kotlarek)
#### Post date: [26 mei 2025 om 08:44 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/13 "2025-05-26T08:44:28Z")

</div>

Fix and spec was just merged

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

[https://github.com/discourse/discourse-doc-categories/pull/40](https://github.com/discourse/discourse-doc-categories/pull/40)

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [26 mei 2025 om 08:53 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/14 "2025-05-26T08:53:24Z")

</div>

Does that fix also resolve the confusing behavior when you open chat in full screen and keep it open in drawer mode?

---

<div class="post-metadata">

### Author: ![kris.kotlarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kris.kotlarek/32/176919_2.png) [@kris.kotlarek](https://meta.discourse.org/u/kris.kotlarek)
#### Post date: [26 mei 2025 om 08:55 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/15 "2025-05-26T08:55:16Z")

</div>

No, you are right, `chat` should be excluded as well. Will fix it in the next PR.

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [26 mei 2025 om 11:56 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/16 "2025-05-26T11:56:29Z")

</div>

Thank you for the speedy fix.

---

<div class="post-metadata">

### Author: ![kris.kotlarek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kris.kotlarek/32/176919_2.png) [@kris.kotlarek](https://meta.discourse.org/u/kris.kotlarek)
#### Post date: [27 mei 2025 om 22:00 UTC](https://meta.discourse.org/t/doc-sub-category-back-to-forum-loop/367513/17 "2025-05-27T22:00:41Z")

</div>

This topic was automatically closed after 20 hours. New replies are no longer allowed.
