# Click the edit button on the category page to go to page 404

**URL:** <https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873>\
**Category:** Bug\
**Created:** [June 24, 2021, 7:07am UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873 "2021-06-24T07:07:09Z")\
**Posts on this page:** 11\
**Page:** 1

## AI-generated summary

Users report a bug where clicking the edit button on a category page leads to a 404 error, particularly when categories use Unicode or accented characters in their slugs (e.g., `日本語`, `santé`). [pinkd](/t/-/194873/1) identified that the issue arises when the slug generation method is not set to 'encoded', especially in non-English environments like Japanese. Even newly created categories with empty slugs can trigger this error if Unicode characters are later used. [pinkd](/t/-/194873/10) confirmed that switching the 'slug generation method' site setting to 'encoded' resolves the 404 error. [jeanmonod](/t/-/194873/11) encountered the same issue with accented characters and received confirmation from [Canapin](/t/-/194873/12) that using 'encoded' slugs or removing accents fixes it. [tshenry](/t/-/194873/9) noted that 'encoded' should be the default when using non-English locales, and was unable to reproduce the bug with that setting enabled. Users suggest that the system should either reject multi-byte characters outright or display a warning when slugs contain unsupported characters to prevent this issue. The bug appears tied to how Discourse handles Unicode slugs without encoding, and the workaround is to ensure the 'slug generation method' is set to 'encoded'.

<div class="post-metadata">

**Author:** ![pinkd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pinkd/32/225490_2.png) [@pinkd](https://meta.discourse.org/u/pinkd)\
**Post date:** [June 24, 2021, 7:07am UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/1 "2021-06-24T07:07:09Z")

</div>

I know the cause and the temporary solution, but I will report it.

After the update, if any slug in the category is empty, it seems that somehow the encoded string is automatically assigned.

Example

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

This seems to be happening in a non-English environment. I was in a Japanese environment.  
Any slugs will remain empty in the newly created category and there seems to be no problem

For reference, you can go to the edit screen by accessing this as a temporary solution.  
Change the value of the number in the category accordingly.  
`https://example.com/c/5-category/edit/general`

I’m not sure if this is just my problem or a common bug, but I hope it helps.

---

<div class="post-metadata">

**Author:** ![osioke](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/osioke/32/238946_2.png) [@osioke](https://meta.discourse.org/u/osioke)\
**Post date:** [June 24, 2021, 1:52pm UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/2 "2021-06-24T13:52:15Z")

</div>

What Discourse version are you on?

---

<div class="post-metadata">

**Author:** ![pinkd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pinkd/32/225490_2.png) [@pinkd](https://meta.discourse.org/u/pinkd)\
**Post date:** [June 24, 2021, 2:00pm UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/3 "2021-06-24T14:00:57Z")

</div>

I am using the latest 2.8.0.beta2

---

<div class="post-metadata">

**Author:** ![pinkd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pinkd/32/225490_2.png) [@pinkd](https://meta.discourse.org/u/pinkd)\
**Post date:** [June 24, 2021, 2:16pm UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/4 "2021-06-24T14:16:55Z")

</div>

I installed it for testing in early June and was preparing for production.

```plaintext
cd /var/discourse
./launcher rebuild app

```

I tried this and it didn’t change.

---

<div class="post-metadata">

**Author:** ![pinkd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pinkd/32/225490_2.png) [@pinkd](https://meta.discourse.org/u/pinkd)\
**Post date:** [June 24, 2021, 2:23pm UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/5 "2021-06-24T14:23:48Z")

</div>

![category-bug](https://global.discourse-cdn.com/meta/original/3X/c/e/cea283a48b44b513e6f961c6b2d0816fb3c769e7.gif)

---

<div class="post-metadata">

**Author:** ![pinkd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pinkd/32/225490_2.png) [@pinkd](https://meta.discourse.org/u/pinkd)\
**Post date:** [June 25, 2021, 6:48am UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/7 "2021-06-25T06:48:28Z")

</div>

> [@Unicode category slug cause 404 error](https://meta.discourse.org/t/unicode-category-slug-cause-404-error/190636):
>
> It’s happening on my production instance and development instance. Reproduce step: Change/create a category with Unicode slug Try to edit the category setting You got a 404 error Return of http://localhost:4200/c/测试/find\_by\_slug.json: { "errors": ["The requested URL or resource could not be found."], "error\_type": "not\_found", "extras": { "html": "\<div class=\"page-not-found\"\>\n \<h1 class=\"title\"\>Oops! That page doesn’t exist or is private.\</h1\>\n\n\n\</div\>\n\n\n\n\<div class=\"row page…

I was able to reproduce it in the above step.  
Even with newly created categories, the category edit button causes a 404 error when using Unicode slugs.

---

<div class="post-metadata">

**Author:** ![pinkd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pinkd/32/225490_2.png) [@pinkd](https://meta.discourse.org/u/pinkd)\
**Post date:** [June 25, 2021, 7:07am UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/8 "2021-06-25T07:07:14Z")

</div>

Unicode slug example:`日本語`

![Unicode](https://global.discourse-cdn.com/meta/original/3X/e/f/efb58eec7b92b436fd19be1c01b3938cc9c8b51d.gif)

After this, as shown in the gif of the previous post, clicking the edit button on the category page returns a 404 error.

---

<div class="post-metadata">

**Author:** ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)\
**Post date:** [June 30, 2021, 12:16am UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/9 "2021-06-30T00:16:55Z")

</div>

Hmm, I’m not able to reproduce the 404 with the `slug generation method` site setting set to `encoded`. I believe this should be enabled by default when you use a relevant `default locale` option.

---

<div class="post-metadata">

**Author:** ![pinkd](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pinkd/32/225490_2.png) [@pinkd](https://meta.discourse.org/u/pinkd)\
**Post date:** [June 30, 2021, 5:29pm UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/10 "2021-06-30T17:29:08Z")

</div>

Thank you!

I didn’t like long slugs and had turned it off before.  
Selecting’encode’ for the slug generation method resolved the 404 error.  
In such a situation, I think that it could be prevented by not accepting multi-byte characters or if there was a cautionary note.

In any case, it’s strange that the encoded string was assigned to the category that was emptying the slug …

---

<div class="post-metadata">

**Author:** ![jeanmonod](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jeanmonod/32/119952_2.png) [@jeanmonod](https://meta.discourse.org/u/jeanmonod)\
**Post date:** [September 28, 2021, 7:12pm UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/11 "2021-09-28T19:12:55Z")

</div>

Same issue here. I have a category named `santé` and I guess the `é` is breaking the redirection to the edition page.  
I see this on my console:

 ![image](https://global.discourse-cdn.com/meta/original/3X/b/c/bc49ea47c09f3a29b2ad6a42bd02c06c84b73b2b.png)

Does someone found a solution?

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [December 28, 2021, 12:58pm UTC](https://meta.discourse.org/t/click-the-edit-button-on-the-category-page-to-go-to-page-404/194873/12 "2021-12-28T12:58:38Z")

</div>

> [@jeanmonod](#):
>
> Does someone found a solution?

I had the issue.

> [@pinkd](#):
>
> Selecting’encode’ for the slug generation method resolved the 404 error.

This solved the issue. I removed the accents from the category identifier.
