דף קטגוריה חדש שנוסף עם תווים שאינם ASCII אינו נטען

סיכום מבוסס בינה מלאכותית

Users report that newly created categories with non-ASCII characters in their titles (e.g., Spanish or French accents) fail to load, showing a loading spinner or redirect loops. kaivalyam initially suspects the issue is related to accented titles. Falco suggests enabling the slug generation method to ‘encoded’, but gh_irina confirms the problem persists even with this setting. Simon experiences a ‘too many redirects’ error and notes a console error related to URL encoding. kaivalyam confirms the issue persists after updates. Simon resolves it by manually updating the category slug via the Rails console, removing accents and spaces. vinothkannans confirms the issue is fixed in the latest Discourse commit.

Hey all,
On a fresh docker install, I added a new category .. but it does not load when the link is clicked, just displays the loading icon but never actually loads.
Same on FF and Brave.
I have added no plugins.

Could it be related to the accented Spanish title, I wonder? …
as in …

Político

4 לייקים

To get working non-ascii slugs you will want to enable slug generation method to encoded in the site settings.

3 לייקים

Genial, gracias.
I have done that now … but I guess I have to re-do the category in order that the slug is auto-generated anew?
But how do I access the page if it won’t load?

לייק 1

We have the same problem, and our slug generation method was already “encoded”.
And it is definitely linked to accents, all our pre-existing categories that had accented titles are now inaccessible.

On my hosted site, I set the slug generation method to ‘encoded’ and then create a category with the name ‘catégorie de test’. After creating the category, my browser’s ‘too many redirects’ error page is displayed. If I then go back to the categories page and click the ‘catégorie de test’ link, I get stuck on the categories page with only the loading spinner displayed.

There are no errors in the site logs. In the console I’m seeing:

Uncaught (in promise) no-response: no-response :: [{"url":"https://testeleven.trydiscourse.com/c/cat%C3%A9gorie-de-test/8/l/latest.json?order=default&ascending=false"}]

Is that the correct encoding that’s being used for the word ‘catégorie’ in the slug?

4 לייקים

There would seem to be some kind of bug here ..?
Appears related to languages?

Also related to my other post .. also language related …
https://meta.discourse.org/t/problem-with-languages-it-mixed-and-drop-the-default/158965

Hi, I am looking for a solution myself …

Update:
I ran the offered site updates via admin.
All went fine.

Now when I try to load the problematic category page, instead of just endlessly trying to load, the page returns an error :
Firefox “The page isn’t redirecting properly”
Brave " This page isn’t working sitename redirected you too many times.

לייק 1

This seems like a bug to me. I will move the topic to our Contribute > Bug category.

To fix the issue on my site, I went to the Rails console and ran:

c = Category.find_by(name: 'exemple de catégorie')
c.update(slug: 'exemple-de-categorie')

After doing that, the category loads correctly. To make this change on your site, you’ll need to substitute your category’s name for the name I used in the above commands. Set the slug in a similar way to what I did above - replace spaces with - and remove any accented characters.

Let us know if you are not sure about how to access your site’s Rails console.

5 לייקים

Thanks, amigo.
Yes, that works a treat.
:balloon:

לייק 1

This is now fixed here :arrow_down:

https://github.com/discourse/discourse/commit/691edc16c9e2a1195b4b726f5623e14ce168214b

7 לייקים

Marvelous.
Well, super efficient support you guys!
Thanks!