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

Browse-by pages produce failing request when REST doesn't support "author" browse #3572

Open
Atmire-Kristof opened this issue Oct 25, 2024 · 0 comments
Labels
bug needs triage New issue needs triage and/or scheduling

Comments

@Atmire-Kristof
Copy link
Contributor

Describe the bug

On a system where the REST API has browse-by index "author" disabled, visiting another browse-by page will produce an error request (but still be able to load the page).

Technical details

BrowseByMetadataPageComponent (from which all other browses also extend) initialises the page by manually setting the search options to browse index "author", before updating this index with the proper one retrieved from the URL's parameters.

This is bad design as it sends an unrelated request and should instead be reworked to simply display a loading indicator until the URL's parameters are read and processed (e.g. with the use of a BehaviorSubject or simply leaving browseEntries$ null and checking for it in the template)

To Reproduce

Steps to reproduce the behavior:

  1. Setup or configure a REST API with "author" browse disabled
  2. Visit any browse-by page. The console and/or network tab will display a failed request for /api/discover/browses/author/entries.

Expected behavior

Browse-by pages should not send a default request to "author" browse when the page is not related to "author" browse in any way.

@Atmire-Kristof Atmire-Kristof added bug needs triage New issue needs triage and/or scheduling labels Oct 25, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage New issue needs triage and/or scheduling
Projects
Status: 🆕 Triage
Development

No branches or pull requests

1 participant