dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Sort query param persists between switching search tabs on entity page, breaking search if not configured

Open MarieVerdonck opened this issue 1 year ago • 2 comments

Describe the bug For an entity page with a tabbed search using two different search configuration. If you in one of the tabs select a sort order which does not exist on the config of the other tab & then switch to the other tab, this will show error there because this sort option that is still present in url and thus applied, doesn't exist for this tab's discovery config.

To Reproduce Steps to reproduce the behavior:

  1. Orgunit page with search for related Authors (Person) and related Search Projects: https://demo.dspace.org/entities/orgunit/04900cb5-0200-40cc-8df1-3d14a6f1b8ca
  2. Go To Search Projects tab => Select sort on title
  3. Switch to Authors tab => Will show error because sort on title (spc.sf=dc.title&spc.sd=ASC) doesn't exist for person discovery config.

Expected behavior When switching between search tabs on entity page, the search params in url should be cleared.

MarieVerdonck avatar Jan 05 '24 11:01 MarieVerdonck