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:
- Setup or configure a REST API with "author" browse disabled
- 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.
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
BehaviorSubjector simply leavingbrowseEntries$null and checking for it in the template)To Reproduce
Steps to reproduce the behavior:
/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.