Skip to content

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

@Atmire-Kristof

Description

@Atmire-Kristof

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.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

🏗 In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions