Search adds username

AI-generated summary

A user (Moin) has reported an issue with the search function on Discourse where the username is added to the search field instead of performing the search. This issue occurs when starting a search query from a user’s profile page and selecting the search option.

Moin has provided steps to reproduce the issue and images to demonstrate the problem. Arkshine has suggested that the issue may be related to starting the search with a category.

Moin notes that this issue may be related to another search issue they recently encountered, which is also related to categories.

Isaac has confirmed that the issue has been fixed in a pull request (https://github.com/discourse/discourse/pull/25652#pullrequestreview-1876195484).

To reproduce the issue:

  1. Navigate to a user’s profile, for example, https://meta.discourse.org/u/hawk/summary.
  2. Begin typing a search query.
  3. Observe the option to :mag:search term or press Enter, then select it.
  4. The expected behavior would be similar to pressing Enter. However, the issue arises when the selected action instead appends the user to the search field, as demonstrated below.
2 Likes

It seems to happen only if you start with the category.

As a side note, this doesn’t render the category as opposed to doing the reverse, and you see (I can’t remember if it was always this way):

Here is a small video:

3 Likes

Thanks, I will take a look!

4 Likes

I had another search issue with categories recently. If this one is related to the category as well, maybe they have more in common than I thought..

3 Likes

@Arkshine fixed by

https://github.com/discourse/discourse/pull/25652#pullrequestreview-1876195484

6 Likes

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