Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SearchBar] attemptPageTypeSearch property doesn't work on multi-word department #1100

Open
EduardoRodriguesF opened this issue Jan 19, 2024 · 0 comments

Comments

@EduardoRodriguesF
Copy link

Describe the bug
Using search-bar's attemptPageTypeSearch property only works for single-word departments and still falls into a regular search page when searching for more than one word.

To Reproduce
Steps to reproduce the behavior:

  1. Set search-bar's attemptPageTypeSearch property to true
  2. Search for a department with two or more words in it
  3. It enters a regular search page

Expected behavior
It should identify that there is a department with that name and access /my-department-example instead of /my%20department%20example.

Additional: If there is not a department that fits the term, it should fallback to regular search route /example?_q=example&map=ft

Screenshots
image

Department is not searchable through normal search-bar settings.

image

We then added attemptPageTypeSearch property as true.

image

It works perfectly for single-word departments as the one in the image.

image

It fails to recognize and convert "tapete infantil" to its department URL.

Desktop:

  • OS: Windows
  • Browser: Chrome

Additional context
This project has a department called "Enxoval" and another that is called "Tapete Infantil". We've used those as an example because they demonstrate when attemptPageTypeSearch is effective and where is its pitfalls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant