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.

3 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