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:
image

Autocompletion doesn’t work when using an accented character:
image

Though the username Aurélien exists.
image

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

6 Likes

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

Can you repro this here?

2 Likes

Now you find real names. What happends if an username has accented characters?

2 Likes

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

image

3 Likes

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 Likes

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

2 Likes

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

image

image

image

image

1 Like

@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 Like

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

2 Likes

@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:

image

1 Like

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 Likes

Here there are!

2 Likes

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 Like

Hi!

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

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

2 Likes

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 Likes

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

1 Like

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 Likes

Well I tried again and now it works:

image

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 Likes

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 Likes