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 Results: Advanced Search Scopes - inaccurate behavior #3332

Closed
6 of 8 tasks
aelibyary opened this issue Nov 22, 2019 · 0 comments · Fixed by #3333 or #3728
Closed
6 of 8 tasks

Search Results: Advanced Search Scopes - inaccurate behavior #3332

aelibyary opened this issue Nov 22, 2019 · 0 comments · Fixed by #3333 or #3728
Milestone

Comments

@aelibyary
Copy link
Contributor

aelibyary commented Nov 22, 2019

Description of bug

Advanced Search > List of available Filters returns other options than the selected ones from the Settings > Results Scope for Content Type(s) and
This is due to how the code matches the scopes,
Currently, it will look for the selected scope, and will check if the name of the other scopes is contained within it. In this example it checks if "Blog Subscribe" contains "Blog" which returns true and therefore it ends up showing that scope as well which is not the expected behavior.

The line with doing the 'contains' match is
https://github.com/dnnsoftware/Dnn.Platform/blob/development/DNN%20Platform/Website/DesktopModules/Admin/SearchResults/SearchResults.ascx.cs#L232

Steps to reproduce

List the steps to reproduce the behavior:

  1. Go to the Search Results page of your site.
  2. Go into Edit mode, and go to the settings of the Search Results Module.
  3. Go to the 'Search Results Settings' Tab
  4. For the 'Results Scope for Content Type(s), uncheck all of the entries and only leave "Blog Roster"
  5. Save the Settings and Refresh the Page.
  6. Click on the Advanced Drop-down located at the right of the search bar
  7. Review the List of available Filters

Current result

It is showing 2 different Scopes "Blog" and "Blog Roster" even though only one scope has been selected.

Expected result

It should only show the scopes that were selected in the settings.

Screenshots

https://drive.google.com/file/d/1QUWOku7j7fjJMusI24WS9BKNbe0GoGvL/view

Error log

Additional context

Affected version

  • 10.0.0 alpha build
  • 9.4.2 alpha build
  • 9.4.1 latest supported release

Affected browser

  • Chrome
  • Firefox
  • Safari
  • Internet Explorer
  • Edge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants