Username autocompletion not working with special characters?

Hi,

Regular French accented characters are allowed in usernames on my forum.

Here’s an example in which using an accented character doesn’t trigger the autocompletion:

Autocompletion works:

Autocompletion doesn’t work when using an accented character:

Though the username Aurélien exists.

Using no accent also returns Aurélien among the results, which is OK, but using an accent shouldn’t prevent the autocompletion from working.

6개의 좋아요

I can’t repro this here on Meta. If I type @ré I do get autocomplete suggestions:

Can you repro this here?

2개의 좋아요

Now you find real names. What happens if a username has accented characters?

2개의 좋아요

Can’t find usernames with accented characters to test this here on Meta, but on my local instance it still works:

3개의 좋아요

Here’s a user here on meta that has an accent in the name. I’ll type the first few letters up to and including the accent to see what happens.

@Auré does not return the name or any suggestions while in the editor. The remaining letters of the name were lien as in Aurélien.

Typing in the entire name did not bring up any suggested names nor did it associate the full name with the same user in the directory.

However, it does work when searching the user directory.

4개의 좋아요

Mine only matches the specific character: (I upgraded about 10 minutes ago).

2개의 좋아요

I just upgraded Discourse to the last version and I tried in safe mode, but the issue persists:

1개의 좋아요

@Canapin if your site is public, can you share the URL with me either here or via a PM? I’d like to login to your site so I can do some debugging.

Can you try again please? I’ve looked at the requests logs for Meta and can’t see any search queries for the term Auré made from your account. I definitely get autocomplete suggestions for Auré:

1개의 좋아요

Sure, https://forum.monocycle.info/
Let me know if you need admin access.

2개의 좋아요

@Osama, It’s working in the editor now. Earlier it may have been the way I pasted the accented character in the editor. :roll_eyes:

1개의 좋아요

I haven’t figured out the root cause for this bug yet, but it seems to be a server-side issue rather than a client/JS issue. This is the API endpoint that the autocomplete library calls to find matching users:

/u/search/users.json?term=Auré&category_id=5&include_groups=true&limit=6`

And I can confirm that a request is made to that endpoint on @Canapin’s instance when I type @Auré in the composer, but the response has zero results. Meta on the other hand, does return some results when that endpoint is called with the same exact params.

@Canapin can you list all the plugins that are installed (even the disabled ones) on your instance?

2개의 좋아요

Here there are!

2개의 좋아요

Hi!

Just a reminder of this issue that still annoys me a bit when I look for someone’s messages… It would be good to know if some fix is planned in the future :slight_smile:

You can also search for the username Stéphane on the same forum if you need another example.

1개의 좋아요

Hi!

Sorry for asking, but did you look into it since then?

I understand it’s low priority though. :slight_smile:

2개의 좋아요

Unfortunately I don’t have much to go on here because the problem seems to be specific to your instance and caused by something on the server side, so not something I can debug on my end :cry: If you can repro this here on Meta or any other instance, I’ll be happy to give this another look.

2개의 좋아요

Is not the issue that the system does not suggest Auré-names when we type Aure (no accent).

1개의 좋아요

No, the problem is that @Canapin’s instance doesn’t include Aurélien in autocomplete suggestions when you type Auré.

We do have a search_ignore_accents site setting, but I’m not sure if it applies when searching for users or if it’s specific to posts.

2개의 좋아요

Well I tried again and now it works:

I’m even wondering if I did try again before mentioning you now that I think about it… Sorry about that. :sweat:

I guess the topic can be closed or deleted (if it’s useless for others) since the issue isn’t anymore.

5개의 좋아요

I don’t think we need to delete, this could pop up again and this topic has plenty context to help if it does.

3개의 좋아요