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

Hitting browse by author from by issue date gets server error #573

Open
cwilper opened this issue Feb 7, 2020 · 3 comments · May be fixed by #3753
Open

Hitting browse by author from by issue date gets server error #573

cwilper opened this issue Feb 7, 2020 · 3 comments · May be fixed by #3753
Assignees
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back component: Discovery related to discovery search or browse system high priority

Comments

@cwilper
Copy link
Contributor

cwilper commented Feb 7, 2020

Whether on the homepage, or scoped to a collection, if you first browse by issue date, then immediately select to browse by author, the list shows, but the javascript console displays an error indicating that a bad request was made.

When the error occurs, the request made is GETting the discover/browses/author/items endpoint. The text of the error in the stack trace is "The requested browse doesn't provide direct access to items you must specify a filter". It's coming from BrowseItemLinkRepository.

@tdonohue tdonohue added bug component: Discovery related to discovery search or browse system labels Apr 29, 2020
@tdonohue
Copy link
Member

tdonohue commented Jun 21, 2022

I encountered this again today on pre-7.3. It appears that our UI is sending two requests when hitting Browse by Author.

  1. /server/api/discover/browses/author/items?scope=[uuid] -> This results in a 500 Exception on the backend, with this error:
    java.lang.IllegalStateException: The requested browse doesn't provide direct access to items you must specify a filter
    at org.dspace.app.rest.repository.BrowseItemLinkRepository.listBrowseItems(BrowseItemLinkRepository.java:82)
    
  2. Immediately after that, the correct request is performed: /server/api/discover/browses/author/entries?scope=[uuid]. This request returns results which are displayed on the page.

From the user perspective, the browse by options appear to work. However, they result in this 500 exception appearing in the DSpace logs and in the DevTools of your browser

While the 500 exception seems harmless, we should fix the browse UI code to only make the proper request.

Moving this to 7.4 and flagging as high priority.

@tdonohue tdonohue added help wanted Needs a volunteer to claim to move forward high priority Estimate TBD labels Jun 21, 2022
@uofmsean
Copy link
Contributor

I am seeing this exception as well while testing with DSpace 7.3. I have ORCID Authority configured for dc.contributor.author but I get no results at all when going to Browse By Author. Browse By Issue Date, Title, and Subject all work fine.

Interestingly, a direct backend server query on /server/api/discover/browses/author/entries shows author entries. This is both with the HAL Browser and also using Postman for testing. And yet, for some reason, the angular UI does not show any results with Browse By Author.

To be clear, the author browse index is configured as:

webui.browse.index.2 = author:metadataAuthority:dc.contributor.author:authority

@uofmsean
Copy link
Contributor

uofmsean commented Sep 16, 2022

Looking at the code and it appears that BrowseByDataType doesn't yet support the "authority" dataType, which is why Browse By Author was showing nothing. Switching back to:

webui.browse.index.2 = author:metadata:dc.contributor.*\,dc.creator:text

and now I see results. Unfortunately, I don't know how this affects the ORCID Authority feature which says to use:

webui.browse.index.2 = author:metadataAuthority:dc.contributor.author:authority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug claimed: Atmire Atmire team is working on this issue & will contribute back component: Discovery related to discovery search or browse system high priority
Projects
Status: 🏗 In Progress
4 participants