# When slug generation method is encoded, It redirected many times when we open new tab opens in topic

**URL:** https://meta.discourse.org/t/when-slug-generation-method-is-encoded-it-redirected-many-times-when-we-open-new-tab-opens-in-topic/67247
**Category:** Bug
**Created:** [8월 1, 2017, 1:51오후 UTC](https://meta.discourse.org/t/when-slug-generation-method-is-encoded-it-redirected-many-times-when-we-open-new-tab-opens-in-topic/67247 "2017-08-01T13:51:49Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Pad\_Pors](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pad_pors/32/52016_2.png) [@Pad\_Pors](https://meta.discourse.org/u/Pad_Pors)
#### Post date: [8월 6, 2017, 2:49오후 UTC](https://meta.discourse.org/t/when-slug-generation-method-is-encoded-it-redirected-many-times-when-we-open-new-tab-opens-in-topic/67247/8 "2017-08-06T14:49:49Z")

</div>

we had faced this problem in our site, and to solve it temporarily and for short time:

1- we changed the `slug generation method` in admin panel to none.  
2- then we created a temp category, and select all old topics with Persian slug, move them to that category, and bring them back!

this way the slug of all the topics became some simple topic-numbers without any Persian character. there’s a simpler way of using code lines in the link below, that I didn’t try:

> [@Automatic encoding of parsed URL params](https://meta.discourse.org/t/automatic-encoding-of-parsed-url-params/67232/13):
>
> Does editing the title on old topics fix the problem? If so, something like this might work on the rails console: Topic.all.each do |topic| topic.title = topic.title topic.save! end (Assigning topic.title re-generates the slug) Please please please take a backup before trying that, as I don’t know if it will have any unintended side effects. It might also take a long time to run depending how many topics you have…

---

_[View the full topic](https://meta.discourse.org/t/when-slug-generation-method-is-encoded-it-redirected-many-times-when-we-open-new-tab-opens-in-topic/67247)._
