Skip to content

Fix hierarchical & advanced search redirecting to global /search#5210

Merged
tdonohue merged 2 commits into
DSpace:mainfrom
alexandrevryghem:w2p-139085_search-fixes_contribute-main
May 15, 2026
Merged

Fix hierarchical & advanced search redirecting to global /search#5210
tdonohue merged 2 commits into
DSpace:mainfrom
alexandrevryghem:w2p-139085_search-fixes_contribute-main

Conversation

@alexandrevryghem
Copy link
Copy Markdown
Member

References

Description

Fixed bug where the hierarchical search & advanced search on community/collection pages redirected the user to the global /search route.

Instructions for Reviewers

List of changes in this PR:

  • Updated the AdvancedSearchComponent & SearchHierarchyFilterComponent to use the currentPath when inPlaceSearch is true (similar to the other search components)

Guidance for how to test/review this PR:

  • Add the following config to your config.yml file
    vocabularies:
      - filter: 'subject'
        vocabulary: 'srsc'
        enabled: true
    search:
      advancedFilters:
        enabled: true
        filter: [title, author, subject, entityType]
  • Navigate to a community/collection page
  • Verify that adding a new filter using the Advanced Search section does not redirect you to /search
  • Verify that selecting values in the subject facet by using the Browse subject tree does not redirect you to /search

Checklist

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
  • My PR passes ESLint validation using npm run lint
  • My PR doesn't introduce circular dependencies (verified via npm run check-circ-deps)
  • My PR includes TypeDoc comments for all new (or modified) public methods and classes. It also includes TypeDoc for large or complex private methods.
  • My PR passes all specs/tests and includes new/updated specs or tests based on the Code Testing Guide.
  • My PR aligns with Accessibility guidelines if it makes changes to the user interface.
  • My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@alexandrevryghem alexandrevryghem self-assigned this Mar 1, 2026
@alexandrevryghem alexandrevryghem added bug component: Discovery related to discovery search or browse system labels Mar 1, 2026
@alexandrevryghem alexandrevryghem added this to the 10.0 milestone Mar 1, 2026
@alexandrevryghem alexandrevryghem moved this to 🙋 Needs Reviewers Assigned in DSpace 10.0 Release Mar 1, 2026
@pzlakowski pzlakowski self-requested a review March 2, 2026 13:56
@pzlakowski
Copy link
Copy Markdown

pzlakowski commented Mar 2, 2026

Checklist:

  • Lint check
  • Test behavior

Works as intended. Looks like the mechanism existed always but there was a ceremony oversight.

Screenshot 2026-03-02 at 15 06 42

Screenshot 2026-03-02 at 15 08 00

+1

@tdonohue tdonohue moved this from 🙋 Needs Reviewers Assigned to 👍 Reviewer Approved in DSpace 10.0 Release Mar 2, 2026
@tdonohue tdonohue added port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release labels May 15, 2026
Copy link
Copy Markdown
Member

@tdonohue tdonohue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thanks @alexandrevryghem ! Verified this fixes the issue in advanced search. Flagged for backport to 9.x and 8.x (as advanced search was added in 8.x).

@tdonohue tdonohue merged commit a95a192 into DSpace:main May 15, 2026
18 of 19 checks passed
@github-project-automation github-project-automation Bot moved this from 👍 Reviewer Approved to ✅ Done in DSpace 10.0 Release May 15, 2026
@dspace-bot
Copy link
Copy Markdown
Contributor

Backport failed for dspace-8_x, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin dspace-8_x
git worktree add -d .worktree/backport-5210-to-dspace-8_x origin/dspace-8_x
cd .worktree/backport-5210-to-dspace-8_x
git switch --create backport-5210-to-dspace-8_x
git cherry-pick -x ed1e94fb6dd5e022fcaf75d49d90d59aebcffcee

@dspace-bot
Copy link
Copy Markdown
Contributor

Successfully created backport PR for dspace-9_x:

@tdonohue
Copy link
Copy Markdown
Member

@alexandrevryghem : This was only able to be auto-backported to 9.x. However, since we only guarantee backports to 9.x, this is good enough. That said, if you or anyone else want to backport this to 8.x, we'd need a separate PR against the dspace-8_x branch.

@tdonohue tdonohue removed the port to dspace-9_x This PR needs to be ported to `dspace-9_x` branch for next bug-fix release label May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug component: Discovery related to discovery search or browse system port to dspace-8_x This PR needs to be ported to `dspace-8_x` branch for next bug-fix release

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants