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

Search block ignores depth setting #5856

Open
mbarde opened this issue Mar 7, 2024 · 0 comments · May be fixed by #6558
Open

Search block ignores depth setting #5856

mbarde opened this issue Mar 7, 2024 · 0 comments · May be fixed by #6558

Comments

@mbarde
Copy link

mbarde commented Mar 7, 2024

Describe the bug

Field "depth" is ignored when configuring the base search query in a search block.

To Reproduce

  1. Create new search block
  2. In base search query set absolute / relative path
  3. In base search query set depth to 1
  4. Results will not be restricted to this depth level

Expected behavior

If path and depth is set, results should only be within specified depth.

Screenshots

Screenshot_2024-03-07_15-37-05
Screenshot_2024-03-07_15-37-25

(page "Level 3" should not be part of the result set)

Software (please complete the following information):

  • OS: Ubuntu
  • Browser: Firefox
  • Volto Version 17.15.4
  • Plone Version 6.0.9
  • Plone REST API Version 9.2.1

Possible fix

In /components/manage/Blocks/Search/hocs/withSearch.jsx include depth into the result of getInitialState, for example by adding following line: depth: data.query?.depth

@TechSubham TechSubham linked a pull request Dec 26, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant