Tag suggestions are inaccurate past 3 characters with tags that have matching prefixes #3132

Closed
opened 2026-02-05 06:04:30 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @merrime-n on GitHub (Sep 13, 2022).

Describe the Bug

[ This bug is apparently reproducible only in RTL languages. ]
[ Since the issue is language-related, the attached screenshots may help comprehend the problem. ]

When the user intends to add a new tag in a page and searches for a Persian word, only the tags are suggested which START with what the user has typed.
For instance, if the user searches for "سلام", the tag suggestions are as follows:

  • سلام
  • سلام بر
  • سلام بر شما

However, if the word that the user has typed is in the middle of a tag, the so-called tag is not suggested.
For example, if the tag is "درود و سلام و تهیت", which contains the word "سلام", it is not shown.

Steps to Reproduce

  1. Change the interface language to Persian.
  2. Go to some random page of a book.
  3. Click on "Add a new tag".
  4. Search for a Persian string.
  5. See? Suggested tags are only the ones that start with that string.

Expected Behaviour

One should be able to search any part of the tag name and be able to find it in suggested tags.

Screenshots or Additional Context

A good illustration of this issue is the one below.
There is a tag, containing two words.

cap8

When the user searches for the first word with which the tag starts, everything is OK.

photo_2022-09-13_15-58-55

But when the 2nd word is typed, nothing is suggested.

photo_2022-09-13_15-58-56

Browser Details

Google Chrome Version 104.0.5112.102 (Official Build) (64-bit) On Windows 10

Exact BookStack Version

v22.09

PHP Version

No response

Hosting Environment

Ubuntu Server 22.04 (installed via Docker Compose)

Originally created by @merrime-n on GitHub (Sep 13, 2022). ### Describe the Bug [ This bug is apparently reproducible only in RTL languages. ] [ Since the issue is language-related, the attached screenshots may help comprehend the problem. ] When the user intends to add a new tag in a page and searches for a Persian word, only the tags are suggested which START with what the user has typed. For instance, if the user searches for "سلام", the tag suggestions are as follows: - سلام - سلام بر - سلام بر شما However, if the word that the user has typed is in the middle of a tag, the so-called tag is not suggested. For example, if the tag is "درود و سلام و تهیت", which contains the word "سلام", it is not shown. ### Steps to Reproduce 1. Change the interface language to Persian. 2. Go to some random page of a book. 3. Click on "Add a new tag". 4. Search for a Persian string. 5. See? Suggested tags are only the ones that start with that string. ### Expected Behaviour One should be able to search any part of the tag name and be able to find it in suggested tags. ### Screenshots or Additional Context A good illustration of this issue is the one below. There is a tag, containing two words. ![cap8](https://user-images.githubusercontent.com/100111649/189890103-2a6f5f50-af75-40e9-94c3-b42867a4e242.PNG) When the user searches for the first word with which the tag starts, everything is OK. ![photo_2022-09-13_15-58-55](https://user-images.githubusercontent.com/100111649/189890302-1f958273-9f71-404f-b982-f1f4fe8296df.jpg) But when the 2nd word is typed, nothing is suggested. ![photo_2022-09-13_15-58-56](https://user-images.githubusercontent.com/100111649/189890418-652b7d1e-ce6b-4a46-b1d5-d6b0b5f14776.jpg) ### Browser Details Google Chrome Version 104.0.5112.102 (Official Build) (64-bit) On Windows 10 ### Exact BookStack Version v22.09 ### PHP Version _No response_ ### Hosting Environment Ubuntu Server 22.04 (installed via Docker Compose)
OVERLORD added the 🐛 Bug label 2026-02-05 06:04:30 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3132