# Left clicking permalink for renamed category does not work

**URL:** https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924
**Category:** Bug
**Created:** [January 17, 2017, 7:11pm UTC](https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924 "2017-01-17T19:11:36Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![ryantm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryantm/32/134063_2.png) [@ryantm](https://meta.discourse.org/u/ryantm)
#### Post date: [January 17, 2017, 7:11pm UTC](https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924/1 "2017-01-17T19:11:36Z")

</div>

Left clicking a permalink that you have linked to from a post does not work.

Steps to reproduce from new development vagrant instance running latest master branch:

1. Make a post that has a link the lounge category (/c/lounge)
2. Edit the lounge category to be lounge2, which creates a permalink for /c/lounge
3. Try left clicking on the link you made in step 1

You should see this error message:

 ![](https://global.discourse-cdn.com/meta/original/3X/a/1/a193189e774b3a507d2906bb815f61a2ced8dac7.png)

Here is the console log:

```
ember:5732 DEBUG: -------------------------------
ember:5732 DEBUG: Ember : 2.10.0
ember:5732 DEBUG: jQuery : 2.2.0
ember:5732 DEBUG: -------------------------------
ember:5732 DEBUG: For more advanced debugging, install the Ember Inspector from https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi
http://192.168.0.86:4000/c/lounge/find_by_slug.json?_=1484680046186 Failed to load resource: the server responded with a status of 403 (Forbidden)
discourse/routes/application:86 Object
error @ discourse/routes/application:86
ember:27784 Error while processing route: discovery.parentCategory
logError @ ember:27784
ember:16911 Error: Forbidden
    at unwrapErrorThrown (ember:30421:15)
    at errorFor (ember:30403:14)
    at onerrorDefault (ember:30393:17)
    at Object.trigger (ember:57841:9)
    at eval (ember:58725:26)
    at invoke (ember:339:14)
    at Queue.flush (ember:407:9)
    at DeferredActionQueues.flush (ember:531:15)
    at Backburner.end (ember:601:23)
    at Backburner.run (ember:724:16)
defaultDispatch @ ember:16911
lounge2:192 Uncaught promise: Object

```

Refreshing the page, or middle clicking the link works.

---

<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: [January 18, 2017, 2:23am UTC](https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924/2 "2017-01-18T02:23:58Z")

</div>

I am not sure this is a bug, if you rename the category why would you expect old links to the previous name to still work?

---

<div class="post-metadata">

### Author: ![ryantm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryantm/32/134063_2.png) [@ryantm](https://meta.discourse.org/u/ryantm)
#### Post date: [January 18, 2017, 3:12am UTC](https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924/3 "2017-01-18T03:12:52Z")

</div>

> [@codinghorror](#):
>
> why would you expect old links to the previous name to still work?

Because Discourse automatically makes a “Permalink”, a URL redirect, when you rename a category. The point of this bug isn’t about renaming categories. All Permalinks do not work in the same way.

---

<div class="post-metadata">

### Author: ![ryantm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryantm/32/134063_2.png) [@ryantm](https://meta.discourse.org/u/ryantm)
#### Post date: [January 18, 2017, 11:51pm UTC](https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924/4 "2017-01-18T23:51:10Z")

</div>

I did some more testing. The bug **is** worse for permalinks that inhabit the same namespace as categories (e.g. “c/lounge”). If you make a permalink that doesn’t inhabit any special namespace (e.g. one with the URL “permalink1”), you get the standard broken “Oops! That page doesn’t exist or is private.” when you left click on it in a forum post. cc @eviltrout

By the way, the non-special route permalinks being broken is another example of a bug that would be fixed by my PR that causes a server-side refresh on an unknown route:

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

---

<div class="post-metadata">

### Author: ![ryantm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryantm/32/134063_2.png) [@ryantm](https://meta.discourse.org/u/ryantm)
#### Post date: [May 16, 2017, 9:33pm UTC](https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924/5 "2017-05-16T21:33:47Z")

</div>

@codinghorror Unless something changed recently, your edit of the title of this thread is not accurate. This issue affects all permalinks. Left clicking any permalink doesn’t work. The category renaming was just an example.

---

<div class="post-metadata">

### Author: ![hellekin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hellekin/32/51636_2.png) [@hellekin](https://meta.discourse.org/u/hellekin)
#### Post date: [November 28, 2018, 6:04pm UTC](https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924/6 "2018-11-28T18:04:44Z")

</div>

Bumping this since I get the same error on latest Discourse.

---

<div class="post-metadata">

### Author: ![Benjol](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjol/32/3907_2.png) [@Benjol](https://meta.discourse.org/u/Benjol)
#### Post date: [January 11, 2019, 7:53am UTC](https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924/7 "2019-01-11T07:53:30Z")

</div>

Fixed here?

> [@Permalinks - rename category - incorrect url](https://meta.discourse.org/t/permalinks-rename-category-incorrect-url/104716):
>
> Subfolder install - I renamed a category today (due to a typo), and the automatically generated permalink redirect did not include the subfolder in the url. It added c/automise/discusssion instead of forums/c/automise/discusssion We were able to work around the issue by manually adding a permalink (after figuring out how to find the categoryid- harder than it should be).

---

<div class="post-metadata">

### Author: ![ryantm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryantm/32/134063_2.png) [@ryantm](https://meta.discourse.org/u/ryantm)
#### Post date: [January 11, 2019, 3:25pm UTC](https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924/8 "2019-01-11T15:25:01Z")

</div>

That bugfix looks only related to categories in subfolder installs not permalink fixing. As I mentioned [above](https://meta.discourse.org/t/left-clicking-permalink-for-renamed-category-does-not-work/55924/5) the title of this topic was incorrectly changed to be more specific than it is. This problem effects all permalinks.
