scientist-softserv / britishlibrary

Other
3 stars 0 forks source link

Relationships lookup temperamental #451

Closed grahamjevon closed 2 months ago

grahamjevon commented 1 year ago

British Museum have reported issues when trying to create relationships between works. And I have replicated this. They were trying to create a relationship between a book chapter and the book it is a part of. Both were already in the repository as works.

In Chrome, when I go the book (parent work) and try to lookup the book chapter that they want to add as a child work, no matches are found.

Image

In Edge, when I do the same thing, it says "Loading Failed".

Image

This seems to be ok in Chrome and Edge on bl.iro.bl.uk, as the below screenshot shows (but I have in the past found that the lookup can be hit and miss).

Image

j-basford commented 9 months ago

this has been discussed in hyku watercooler/interest group so is happening to other hykus (PALS - so SoftServ may know more and would be worth checking in with them)

cziaarm commented 9 months ago

I'm seeing Too long URI errors that seem to be originating from a call to blacklight's search

soooo now that we've switched blacklight to default to POST requests (#473) this should be remedied on staging.

A bit difficult to test as we don't have an example of this specific failure on staging to test.

However my understanding is that the issue we are seeing on the BM item is due to the look up cross-referencing other child works, and when there are a lot of child works then we are seeing the "Too long" error.

An example of this on staging would be https://bl.bl-staging.notch8.cloud/concern/books/172418b3-0cd4-4635-8b5a-ddb171961b0b/edit?locale=en#relationships

The child work lookup is currently working but I think it would have been broke before https://github.com/scientist-softserv/britishlibrary/pull/479

grahamjevon commented 9 months ago

I agree this is difficult to test on staging. Moving this along so that we can test properly on production.

grahamjevon commented 8 months ago

Hi @cziaarm , I've just tested this on production and the example at the top of this ticket is still experiencing the same issue.

grahamjevon commented 6 months ago

Could this be related to #502 ?

NoraRamsey commented 3 months ago

National Trust and NMS have flagged this (March 2024)

Image

grahamjevon commented 2 months ago

Hi @NoraRamsey Do you want to have a go at testing this on staging? It might be difficult to test definitively as we don't have a known example on staging to verify the fix against.

cziaarm commented 2 months ago

The bug here was that no collection lookups were working. So a successful test would be to use any of the various collection lookups (e.g. relationships, adding a work to a collection, etc)

NoraRamsey commented 2 months ago

I was able search relationships via the home page and the dashboard. I'm happy to pass this along.

grahamjevon commented 2 months ago

Hi @cziaarm can this be deployed to production? Kew have also commented on this issue today so they would benefit from this fix. Thanks

grahamjevon commented 2 months ago

Hi @cziaarm The original example flagged at the very top of this thread is still experiencing the same issue. If I open this book, I can't then add this book chapter via the > Edit > Relationships page.

Image

cziaarm commented 2 months ago

The child work search has a bunch of filters that are probably ruling out the result you were expecting. I've tested this on works that I know will get through the filters and it appears to be working as expected.

The filters are:

:show_only_other_works, :show_only_works_not_child, :show_only_works_not_parent and :show_only_resource_depositord_by_current_user

I'm guessing it is the last of those (a condition for all the Hyrax::My::SearchBuilders) that means you would need to be logged in as the depositor of that work (support@notch8.com) to add it as a child work .

grahamjevon commented 2 months ago

Does that fourth filter (:show_only_resource_depositord_by_current_user) mean, for example, that if I upload a work, Nora would not be able to add it as the child of another work using this method? So if I uploaded a work today and leave the organisation tomorrow, thereafter no-one will be able to add that work as the child of another work? Bulkrax would become the only means of creating this relationship in this scenario. Have I understood that correctly?

If I have understood that correctly, do you know what the rationale for this filter is?

grahamjevon commented 1 month ago

I am approving this fix and have created a new ticket to remove the problematic child works search filter: #542