Accenteren of geen accenten in categorie slug toestaan volgens de "slug generatie methode" instelling

AI-generated summary

In a discussion about whether accented characters should be allowed in category slugs based on the “slug generation method” setting, Benjamin_D reported that in Discourse 2.6.0 beta4 (French locale), using an accented slug with the “ascii” setting caused page loading failures. tshenry suggested switching the setting to “encoded”, which resolved the issue, referencing a prior bug report here. Benjamin_D acknowledged the oversight and proposed that users should be prevented from accidentally setting accented slugs when “ascii” is selected, noting that the system previously auto-cleaned such characters. tshenry agreed, describing the current behavior as jarring — users can unknowingly create broken pages without realizing the setting is the culprit. Benjamin_D humorously admitted he didn’t even consider the setting, assuming accented slugs weren’t supposed to work. Finally, Benjamin_D confirmed the issue appears resolved, citing Falco as having implemented a fix.

Latest 2.6.0 beta4, dev environment, ubuntu 20.04, firefox 81, french locale ( :roll_eyes: yeah I know, :sweat_smile: )
I’m not sure if I should be able to have one, but a category slug with an accented character (from a newly created category) makes the loading of the domain/c/slug/id page to fail (to many redirect?).
In the mean time, just in case, the rails solution
Category.where(id: the-id-number).update(slug: "the-slug-without-any-accent")

Have you tried setting the slug generation method site setting to “encoded” by chance?

There was a similar bug reported here: Newly added non-ASCII category page does not load. If it seems like something has regressed, let us know!

3 likes

aah sorry, I should have looked a little harder :sweat_smile:
indeed slug generation method was set to ascii
with encoded, it works fine!
I’m usually careful to avoid accents in slugs, old habits, but I have the feeling the app cleaned it for me a few times.

Could (should) I be prevented to set (by mistake) an accented slug with the setting to ascii ?

1 like

I think there’s definitely room to improve this in some way. I tried it out and it feels pretty jarring to innocently enter a slug with an accented character, save, and get hit with a broken page you can’t fix until you figure out that setting exists.

2 likes

Oh yes!
Even if I (kind of) guessed what was was going on in the first place, I managed not to search for “accent” and “category” but “accentuated” and “accented”

I didn’t even think of a setting, persuaded it was not supposed to work :smile:

1 like

I think it’s done :+1:

1 like

This topic was automatically closed after 6 days. New replies are no longer allowed.