A discussion on Discourse’s meta forum addresses a bug causing ERR_TOO_MANY_REDIRECTS when opening topics with non-English characters in their slugs. Alavi1412 identifies that the issue arises from encoding mismatches between the slug stored in the database and the slug in the URL, particularly affecting Persian (RTL) titles. The problem stems from differences in encoding and potential whitespace in the slug, as shown by debugging outputs where @topic_view.topic.slug and params[:slug] differ in length and content. fantasticfears suggests using .strip to remove whitespace, but Alavi1412 confirms it doesn’t resolve the issue. Pad_Pors shares a temporary workaround involving changing the slug generation method and moving topics to reset their slugs. mpalmer notes the params[:slug] encoding is likely ASCII-8BIT, pointing to a broader encoding issue. tgxworld suggests the bug may be fixed in newer versions, specifically after upgrading to Rails 5.1.
I found out that the error ERR_TOO_MANY_REDIRECTS after last update was because of non-english character in title. When I changed the slug generation method to none, and created a new topic(that doesn’t include non-english character in slug and url) it opens with no error but that previous topics has still the problem.
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: