# 404 error when you revert a tag name after changing it without reloading the page

**URL:** https://meta.discourse.org/t/404-error-when-you-revert-a-tag-name-after-changing-it-without-reloading-the-page/342559
**Category:** Bug
**Tags:** tags
**Created:** [December 15, 2024, 7:49pm UTC](https://meta.discourse.org/t/404-error-when-you-revert-a-tag-name-after-changing-it-without-reloading-the-page/342559 "2024-12-15T19:49:48Z")
**Posts on this page:** 3
**Page:** 1

<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 15, 2024, 7:49pm UTC](https://meta.discourse.org/t/404-error-when-you-revert-a-tag-name-after-changing-it-without-reloading-the-page/342559/1 "2024-12-15T19:49:48Z")

</div>

This is a very minor bug, sort of an edge case, but hitting a 404 is never pleasant as it triggers a “did I do something wrong?” when managing a website.

Changing a tag name and reverting it to a previous tag name choice on the same screen (meaning, without reloading the page) causes a 404 error.

![tag 404)](https://global.discourse-cdn.com/meta/original/4X/9/0/f/90fe7a1f07e96d1e121516d596b5facac0fd24ce.gif)

![tag 404](https://global.discourse-cdn.com/meta/original/4X/d/c/e/dce5296f79aa6f709585757e189ea66366cf2879.gif)

If you change a tag name at least once and end up choosing any tag name you **previously validated on the same screen** (or the original name), Discourses requests a wrong `/tag/<tag_name>/notifications` route using an unused `tag_name`, which results in a 404 error.

Reproduction steps:

1. Open an existing tag page: `https://your-discourse.com/tag/a`

2. Click the wrench, change the name and validate ✅

3. (optional) change the name again

4. Revert the name to one of the previous ones (or the original tag name)

5. 4️⃣ 0️⃣ 4️⃣

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [January 29, 2025, 2:36am UTC](https://meta.discourse.org/t/404-error-when-you-revert-a-tag-name-after-changing-it-without-reloading-the-page/342559/6 "2025-01-29T02:36:18Z")

</div>

Thanks for the detailed report, I’ve got a fix for this now which should be merged soon:

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

---

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [January 30, 2025, 12:51am UTC](https://meta.discourse.org/t/404-error-when-you-revert-a-tag-name-after-changing-it-without-reloading-the-page/342559/7 "2025-01-30T00:51:23Z")

</div>

Okay it’s merged now 🚀
